Re: [jQuery] Validation and AJAX forms
I've still not gone anywhere with this. Any suggestions? Thanks Steffan From: Steffan Cline stef...@hldns.com Reply-To: jquery-en@googlegroups.com Date: Mon, 22 Mar 2010 22:54:32 -0700 To: jquery-en@googlegroups.com jquery-en@googlegroups.com Subject: [jQuery] Validation and AJAX forms I'm tinkering with the jquery forms plugin with the validation plugin. I'm able to do some simple validations but I have some BIG forms that are loaded dynamically. I want to use the addClassRules() with the ajax but am unsure how to do it. Currently I have a multi tab form. The first tab is simple. $('#form-step1').validate({rules: { loantype: required }, messages: { loantype: You must select a loan type. }, errorLabelContainer: #form1-error, submitHandler: function(form) { //$(form).ajaxSubmit(); nextTab(); } }); BUT on the second tab I have another form but its far longer. How would I set it up to use the ajax like above AND the addClassRules? Within this form, I have some other radio dials which will use .load() to include additional data based on options so using the class would work well. Any suggestions are appreciated! Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member --- To unsubscribe from this group, send email to jquery-en+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject. To unsubscribe from this group, send email to jquery-en+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
[jQuery] Validation and AJAX forms
I'm tinkering with the jquery forms plugin with the validation plugin. I'm able to do some simple validations but I have some BIG forms that are loaded dynamically. I want to use the addClassRules() with the ajax but am unsure how to do it. Currently I have a multi tab form. The first tab is simple. $('#form-step1').validate({rules: { loantype: required }, messages: { loantype: You must select a loan type. }, errorLabelContainer: #form1-error, submitHandler: function(form) { //$(form).ajaxSubmit(); nextTab(); } }); BUT on the second tab I have another form but its far longer. How would I set it up to use the ajax like above AND the addClassRules? Within this form, I have some other radio dials which will use .load() to include additional data based on options so using the class would work well. Any suggestions are appreciated! Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member --- To unsubscribe from this group, send email to jquery-en+unsubscribegooglegroups.com or reply to this email with the words REMOVE ME as the subject.
Re: [jQuery] [Maybe OT] Table width 100%
Yes, I have. Actually, that is what is there and I made a mistake when I set this. I Googled some more this morning and found something that may work. I'll need to try it later. The description that someone else posted was that IE renders the table in the dev before it renders the scroll bar and that's why. Supposedly adding zoom:1 to the scroller and then to nest another div around the inner table with a zoom:1 will fix it. I'll see I guess and report back. Thanks for the reply! -Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member --- From: Nathan Klatt n8kl...@gmail.com Reply-To: jquery-en@googlegroups.com Date: Fri, 5 Feb 2010 08:19:29 -0600 To: jquery-en@googlegroups.com Subject: Re: [jQuery] [Maybe OT] Table width 100% On Fri, Feb 5, 2010 at 12:41 AM, Steffan A. Cline stef...@hldns.com wrote: I have a div set to 600px wide and 400px tall. Inside I load different height tables so I have overflow: scroll to make the div scrollable. Have you tried overflow:auto? Nathan
[jQuery] [Maybe OT] Table width 100%
This may be OT. It could be pure css or it could require some jQuery. I have a div set to 600px wide and 400px tall. Inside I load different height tables so I have overflow: scroll to make the div scrollable. On FF and Safari, if I set the table width to 100%, it stretches to the left side of the vertical scroll bar with no horizontal scroll bar. On MSIE, it runs to the width of the div to the right side of the vertical scroll bar and then shows the horizontal scroll bar cutting off text as it's hidden under the scroll bar. Is there anyway to trick IE to run it to the left side of the scroll bar rather than the right without JS/jQuery? Is jQuery the only way to make this work? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Draggable ordered object in a form
Are there any good examples of where you have draggable objects in a form that be ordered and that order be submitted with the form data? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Dynamic Selects
I am wondering if I'm missing something in my code. I have a select that is populated via $(#mySelect).load(something.html). This page of course returns a bunch of option value=xxX/option. I have verified that the code is populated correctly via viewing the source. After the .load() I try to set the selected value via .val(something). The option I am trying to select is there. It's as if the .val(xxx) does not work on a select that is populated this way. Is there something I am missing? There has to be a work around. Suggestions? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
Re: [jQuery] Dynamic Selects
Ok. I figured it out. It is a race issue. I needed to wait for the data to load. I did not realize that load() had a callback. Solution: $(#province).load(/async/async_provinces.lasso?cc= + val, function() {$(#province).val(provincecode);}); Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member --- From: Steffan Cline stef...@hldns.com Reply-To: jquery-en@googlegroups.com Date: Sat, 23 Jan 2010 21:42:15 -0700 To: jquery-en@googlegroups.com jquery-en@googlegroups.com Subject: [jQuery] Dynamic Selects I am wondering if I'm missing something in my code. I have a select that is populated via $(#mySelect).load(something.html). This page of course returns a bunch of option value=xxX/option. I have verified that the code is populated correctly via viewing the source. After the .load() I try to set the selected value via .val(something). The option I am trying to select is there. It's as if the .val(xxx) does not work on a select that is populated this way. Is there something I am missing? There has to be a work around. Suggestions? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
Re: [jQuery] New Forums
Same here. I read the emails daily. A forum that emails as well, is a better option. Hell, I¹d even be willing to setup something on my colo if it would help out. John would have all the control he needs. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member --- From: Rick Faircloth r...@whitestonemedia.com Organization: White Stone Media Reply-To: jquery-en@googlegroups.com Date: Fri, 22 Jan 2010 10:31:38 -0500 To: jquery-en@googlegroups.com Subject: RE: [jQuery] New Forums But isn¹t it possible to ³have our cake and eat it, too² in this situation? I¹m a member of the CF-Talk (ColdFusion) group and we use both a mailing list and an online system. (I¹m hesitant to call the online system a ³forum² because it may not fit the accepted definition of a forum). However, people can go online and use the system for reading the mail and search the archives, or they can just use their email for the same messages, as I do. The main difference between the two, I think, is that House of Fusion runs their own servers and software, whereas, it looks like John is outsourcing that work, which is understandable. But there out to be a solution that provides both forum and email solutions simultaneously. Surely, if someone chooses it, there is an option to send all messages to someone¹s email address and not just messages from particular threads. Perhaps John, et al, should go over to www.HouseOfFusion.com http://www.HouseOfFusion.com and see how it¹s being doing there and discuss this issue with those that control the CF-Talk list, as well as the other lists that are present, such as CF-Newbie. (I¹ve always thought and have suggested that a jQuery-Newbie list would be of great benefit to the jQuery community to separate the beginner questions from the advanced side of things. I just know, that as busy as I am, I won¹t have time or the desire to visit a forum constantly and check what people are posting. I do read people¹s posts and even if I don¹t know the answer, I read responses to learn and help when I can. I have to be in my email constantly for client communications and taking the jQuery list out of my central area of communications (email) is going to kill my participation in the jQuery list, unfortunately. Rick From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Karl Swedberg Sent: Friday, January 22, 2010 9:30 AM To: jquery-en@googlegroups.com Subject: Re: [jQuery] New Forums On Jan 21, 2010, at 8:11 PM, brian wrote: FWIW, I'm pretty sure the decision to drop Google Groups is due to John Ressig's account being spoofed by spammers. No, that's not it. Okay, maybe it was one of the last straws, but we've been talking about moving to a forum for a couple years now. If you want to know what factors were involved in the decision, please read http://jquery14.com/day-07/new-jquery-forum/ To be honest, I've never been a fan of forums, either. But after spending some time in the jQuery forum, I'm starting to appreciate its advantages over a plain mailing list. I wish there were a solution out there that is ideal for everyone. Unfortunately, though, every solution comes with its own set of compromises. --Karl Karl Swedberg www.englishrules.com http://www.englishrules.com www.learningjquery.com http://www.learningjquery.com
[jQuery] Select with different fonts for each element
I have a select where a user selects a font (style) and it is applied to text on the page. What I am after is if there is a way via plugin etc where the dropdown will have the style applied to each row. I am after something like a font menu in MS Word buy using web fonts. Any suggestions? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
Re: [jQuery] Select with different fonts for each element
This is basically the select in question. select name=line1font onchange=changeFont(this,1); option value=Arial, Helvetica, sans-serifArial/option option value='Arial Black', 'Arial Black', Gadget, sans-serifArial Black/option option value='Comic Sans MS', cursiveComic Sans/option option value='Courier New', 'Courier New', Courier, monospaceCourier New/option option value=Georgia, serifGeorgia/option option value=Impact, Charcoal, sans-serifImpact/option option value='Lucida Console', Monaco, monospaceLucida Console/option option value='Lucida Sans Unicode', 'Lucida Grande', sans-serifLucida Sans Unicode/option option value='Palatino Linotype', 'Book Antiqua', Palatino, serifPalatino/option option value=Tahoma, Geneva, sans-serifTahoma/option option value='Times New Roman', Times, serifTimes New Roman/option option value='Trebuchet MS', Helvetica, sans-serifTrebuchet MS/option option value=Verdana, Geneva, sans-serifVerdana/option option value='MS Sans Serif', Geneva, sans-serifMS Sans Serif/option option value='MS Serif', 'New York', serifMS Serif/option /select I didn't know if a plugin existed that could take the value and apply it as a style to the elements of the select somehow. Thanks Steffan From: Steffan Cline stef...@hldns.com Reply-To: jquery-en@googlegroups.com Date: Sat, 02 Jan 2010 14:07:36 -0700 To: jquery-en@googlegroups.com jquery-en@googlegroups.com Subject: [jQuery] Select with different fonts for each element I have a select where a user selects a font (style) and it is applied to text on the page. What I am after is if there is a way via plugin etc where the dropdown will have the style applied to each row. I am after something like a font menu in MS Word buy using web fonts. Any suggestions? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
Re: [jQuery] Re: Select with different fonts for each element
Well, this was the closest. It sounds like what you tried. Maybe his div overlay is the only option. http://fullfatcode.wordpress.com/2009/06/05/a-simple-jquery-font-chooser-plu gin/ Thanks Steffan From: Šime Vidas sime.vi...@gmail.com Reply-To: jquery-en@googlegroups.com Date: Sat, 2 Jan 2010 13:42:05 -0800 (PST) To: jQuery (English) jquery-en@googlegroups.com Subject: [jQuery] Re: Select with different fonts for each element I made it work in Firefox, but in IE it seems impossible to style each OPTION element individually, same problem in Chrome But, I have an idea... give me a minute :)
Re: [jQuery] Re: Select with different fonts for each element
Wow. That was quick and VERY cool. Think you'll package that into a plugin architecture? Simply, WOW! Thanks Steffan From: Šime Vidas sime.vi...@gmail.com Reply-To: jquery-en@googlegroups.com Date: Sat, 2 Jan 2010 14:59:34 -0800 (PST) To: jQuery (English) jquery-en@googlegroups.com Subject: [jQuery] Re: Select with different fonts for each element OK, this is it :) We can call this version alpha 0.1... the code is super-messy, and it most certanly won't work if you just copy-paste it... but this example actually works in all browsers... http://vidasp.net/jquery-example6.html
Re: [jQuery] Re: Select with different fonts for each element
Sweet! I'll be watching for it! Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member --- From: Šime Vidas sime.vi...@gmail.com Reply-To: jquery-en@googlegroups.com Date: Sat, 2 Jan 2010 15:34:30 -0800 (PST) To: jQuery (English) jquery-en@googlegroups.com Subject: [jQuery] Re: Select with different fonts for each element I had to go play cards with my cousin, so i left the code messy... it has several bugs for now (try hovering over the list and then hovering out without clicking any item)... It should take my 30 minutes to refactor the code and kill the bugs...
[jQuery] Re: JCarouselLite - pause scrolling
on 9/21/09 4:27 AM, dudal at jes...@dudal.com wrote: Hi again I have put up a minified version of the script: http://www.dudal.com/jquery/jquery.jcarousellite.pauseOnHover.min.js The minifyer choked on a css float attribute in the original script. Seems that the minified version is working fine after quoting float. Best Jesper Thanks Jesper. I Googled around on Saturday until I found some notes talking about the YUI compressor choking on that. I tried their instructions of putting quotes around float and viola! It worked. I tried it all and yes, it does work great! On 19 Sep., 22:15, Steffan A. Cline stef...@hldns.com wrote: on 9/18/09 7:49 AM,dudalat jes...@dudal.com wrote: Hey Steffan I'm glad you like it. I used to go with the full carousel version just for this feature, but then I looked into the code and found that it could be acomplished using only 3 lines of code or so. I posted it on Ganeshjis website hoping that he will include it in his official release. /Jesper On 18 Sep., 15:42, Steffan A. Cline stef...@hldns.com wrote: on 9/18/09 5:30 AM,dudalat jes...@dudal.com wrote: Hi Steffan I had the same problem and came up with the following modification: http://www.dudal.com/jquery/jquery.jcarousellite.pauseOnHover.js(not minified) Example config (notice pauseOnHover): $('#selector').jCarouselLite({ auto: 2000, speed: 1500, visible: 1, circular: true, pauseOnHover: true }); That ensures that the carousel will not advance when the mouse is over the carousel. I hope that helps. Yes, it does. Awesome! I tried to get a hold of the author to ask about this but he didn't answer the email. It would be nice to see your changes committed to this project. Thanks!! Best JesperDudal DudalWebdesign http://www.dudal.com On 7 Sep., 18:26, Steffan A. Cline stef...@hldns.com wrote: on 9/6/09 11:54 PM, Jonathan Vanherpe (T T NV) at jonat...@tnt.be wrote: Steffan A. Cline wrote: on 8/28/09 5:37 PM, Steffan Cline at stef...@hldns.com wrote: I have a carousel that auto scrolls images. I was asked if there is a way to make it so that if you mouse over the carousel, it stops and when you mouse out, it starts up again. Is this possible? Anyone? Thanks Steffan The plain jcarousel has this option: http://sorgalla.com/projects/jcarousel/examples/static_auto.html Jonathan Thanks. I saw that option but I have already integrated theliteversion :( I hope the author of theliteversion speaks up. Thanks Steffan Thanks Steffan Anyone able to minify this? It's finding syntax errors and saying that some properties are wrong. Odd. Suggestions are welcome. Thanks Steffan Thanks Steffan
[jQuery] Re: JCarouselLite - pause scrolling
on 9/18/09 7:49 AM, dudal at jes...@dudal.com wrote: Hey Steffan I'm glad you like it. I used to go with the full carousel version just for this feature, but then I looked into the code and found that it could be acomplished using only 3 lines of code or so. I posted it on Ganeshjis website hoping that he will include it in his official release. /Jesper On 18 Sep., 15:42, Steffan A. Cline stef...@hldns.com wrote: on 9/18/09 5:30 AM,dudalat jes...@dudal.com wrote: Hi Steffan I had the same problem and came up with the following modification: http://www.dudal.com/jquery/jquery.jcarousellite.pauseOnHover.js(not minified) Example config (notice pauseOnHover): $('#selector').jCarouselLite({ auto: 2000, speed: 1500, visible: 1, circular: true, pauseOnHover: true }); That ensures that the carousel will not advance when the mouse is over the carousel. I hope that helps. Yes, it does. Awesome! I tried to get a hold of the author to ask about this but he didn't answer the email. It would be nice to see your changes committed to this project. Thanks!! Best JesperDudal DudalWebdesign http://www.dudal.com On 7 Sep., 18:26, Steffan A. Cline stef...@hldns.com wrote: on 9/6/09 11:54 PM, Jonathan Vanherpe (T T NV) at jonat...@tnt.be wrote: Steffan A. Cline wrote: on 8/28/09 5:37 PM, Steffan Cline at stef...@hldns.com wrote: I have a carousel that auto scrolls images. I was asked if there is a way to make it so that if you mouse over the carousel, it stops and when you mouse out, it starts up again. Is this possible? Anyone? Thanks Steffan The plain jcarousel has this option: http://sorgalla.com/projects/jcarousel/examples/static_auto.html Jonathan Thanks. I saw that option but I have already integrated theliteversion :( I hope the author of theliteversion speaks up. Thanks Steffan Thanks Steffan Anyone able to minify this? It's finding syntax errors and saying that some properties are wrong. Odd. Suggestions are welcome. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: JCarouselLite - pause scrolling
on 9/18/09 5:30 AM, dudal at jes...@dudal.com wrote: Hi Steffan I had the same problem and came up with the following modification: http://www.dudal.com/jquery/jquery.jcarousellite.pauseOnHover.js (not minified) Example config (notice pauseOnHover): $('#selector').jCarouselLite({ auto: 2000, speed: 1500, visible: 1, circular: true, pauseOnHover: true }); That ensures that the carousel will not advance when the mouse is over the carousel. I hope that helps. Yes, it does. Awesome! I tried to get a hold of the author to ask about this but he didn't answer the email. It would be nice to see your changes committed to this project. Thanks!! Best Jesper Dudal Dudal Webdesign http://www.dudal.com On 7 Sep., 18:26, Steffan A. Cline stef...@hldns.com wrote: on 9/6/09 11:54 PM, Jonathan Vanherpe (T T NV) at jonat...@tnt.be wrote: Steffan A. Cline wrote: on 8/28/09 5:37 PM, Steffan Cline at stef...@hldns.com wrote: I have a carousel that auto scrolls images. I was asked if there is a way to make it so that if you mouse over the carousel, it stops and when you mouse out, it starts up again. Is this possible? Anyone? Thanks Steffan The plain jcarousel has this option: http://sorgalla.com/projects/jcarousel/examples/static_auto.html Jonathan Thanks. I saw that option but I have already integrated theliteversion :( I hope the author of theliteversion speaks up. Thanks Steffan Thanks Steffan
[jQuery] ID naming conventions and $.scrollTo()
I was peaking around on the W3C site to see if I could find a clear definition of which characters are allowed within an ID. The problem is that I have a series of divs that have id=aq-1234 cd-456 etc. I have no real control over the - in the name. What would be another way of clearly identifying an object without the id? td id=aq-1234 is what I have now. I've not used the rel=xxx that I see some people use. Would that be acceptable? Clearly $(#aq-1234) is not. Any suggestions? Thanks Steffan
[jQuery] Re: Selects populating other selects from JSON data
on 9/12/09 8:02 AM, Alex Weber at alexwebe...@gmail.com wrote: Hey, two suggestions: First off, if you're using JSON data to populate it then I assume the data will come from an external source and you are only generating it in your script for testing purposes. Actually, I wrote this for a friend that insists the data set is small and wants to just embed it in the page. In that case, perfect. If not, and the data is actually hard-coded, then you shouldn't really be doing it like this! I would agree but I have no choice here. Finally, what I would do and its really just matter of preference, instead of doing this: $(select[name='model']).empty(); $.each(model, function (){ $(select[name='model']).append('option value=' + this + '' + this + '/option') }); } Agreed I missed this. I would do the following: var options = ''; $.each(model, function (){ html += 'option value=' + this + '' + this + '/option'); }); $(select[name='model']).html(options); It should increase the performance because you cache all the data in a variable and insert it into the select in one step, instead of appending it during each iteration. Using html() will overwrite the previous contents too, so no need to use empty() either. Well this is what I currently have. I think I am doing too many .each() though. Isn't there a get or find that I can do to eliminate iterating thru all sets to find the selected manufacturer then add the models? Here is what I currently have. $(document).ready(function () { var items = {Aquatech : [Canon 5D Mark II,Nikon D3,Nikon D3x,Canon 1D,Canon 1Ds,Canon 1Ds Mark II,Canon 1Ds Mark III,Canon 1D Mark III,Canon 30D,Canon EOS 5D,Canon 20D,Nikon D200,Nikon D700,Canon 40D,Canon 50D,Nikon D300], Canon : [Canon HF20,Canon SD800,Canon A570,Canon G10,Canon G11], Ikelite : [Olympus FE-360,Canon 20D,Canon Rebel 350 / XT,Nikon D300,Canon Rebel 400 / XTi,Canon 30D,Canon 5D,Nikon D200,Nikon D40,Nikon D40x,Nikon D60,Olympus SP-510,Olympus E-500,Canon G9,Nikon P5000,Nikon P5100,Nikon D80,Nikon D90,Nikon P6000,Nikon D700,Canon 40D,Canon 50D,Canon G10,Canon 5D Mark II,Canon Rebel 500 / T1i,Canon Rebel 450 / XSi], Sony : [Sony W300] }; $.each( items, function(brand){ $(select[name='manufacturer']).append('option value=' + brand + '' + brand + '/option'); }); $(select[name='model']).attr('disabled','disabled'); $(select[name='manufacturer']).change( function(){ var man = this.value; if( !this.selectedIndex ) $(select[name='model']).empty().attr('disabled','disabled'); $.each( items, function(brand, model){if(brand==man) { var options= 'option value=Select a brand/option'; $.each(model, function (){ options += 'option value=' + this + '' + this + '/option'}); $(select[name='model']).removeAttr('disabled').html(options); } }); }); }); Any suggestions to simplify this would be appreciated. Cheers, Alex On Sep 12, 12:48 am, Steffan A. Cline stef...@hldns.com wrote: on 9/11/09 8:02 PM, Steffan Cline at stef...@hldns.com wrote: on 9/11/09 5:15 PM, Steffan Cline at stef...@hldns.com wrote: Perhaps I am not Googling correctly to find the data I am after. I want to have a select that upon making a choice will add elements to a second select. I've seen code to do this using ajax calls but what if I embed the data into the page in a JSON format? I am looking for a good example of this. Anyone seen one? Ok, getting closer: $(document).ready(function () { var items = { Aquatech : [Canon 5D Mark II,Nikon D3,Nikon D3x,Canon 1D,Canon 1Ds,Canon 1Ds Mark II,Canon 1Ds Mark III,Canon 1D Mark III,Canon 30D,Canon EOS 5D,Canon 20D,Nikon D200,Nikon D700,Canon 40D,Canon 50D,Nikon D300], Canon : [Canon HF20,Canon SD800,Canon A570,Canon G10,Canon G11], Ikelite : [Olympus FE-360,Canon 20D,Canon Rebel 350 / XT,Nikon D300,Canon Rebel 400 / XTi,Canon 30D,Canon 5D,Nikon D200,Nikon D40,Nikon D40x,Nikon D60,Olympus SP-510,Olympus E-500,Canon G9,Nikon P5000,Nikon P5100,Nikon D80,Nikon D90,Nikon P6000,Nikon D700,Canon 40D,Canon 50D,Canon G10,Canon 5D Mark II,Canon Rebel 500 / T1i,Canon Rebel 450 / XSi], Sony : [Sony W300] }; $.each( items, function(brand){ $(select[name='manufacturer']).append('option value=' + brand + '' + brand + '/option'); }); $(select[name='manufacturer']).change( function(){ $ }); }); So
[jQuery] Selects populating other selects from JSON data
Perhaps I am not Googling correctly to find the data I am after. I want to have a select that upon making a choice will add elements to a second select. I've seen code to do this using ajax calls but what if I embed the data into the page in a JSON format? I am looking for a good example of this. Anyone seen one? Thanks Steffan
[jQuery] Re: Selects populating other selects from JSON data
on 9/11/09 5:15 PM, Steffan Cline at stef...@hldns.com wrote: Perhaps I am not Googling correctly to find the data I am after. I want to have a select that upon making a choice will add elements to a second select. I've seen code to do this using ajax calls but what if I embed the data into the page in a JSON format? I am looking for a good example of this. Anyone seen one? Ok, getting closer: $(document).ready(function () { var items = {Aquatech : [Canon 5D Mark II,Nikon D3,Nikon D3x,Canon 1D,Canon 1Ds,Canon 1Ds Mark II,Canon 1Ds Mark III,Canon 1D Mark III,Canon 30D,Canon EOS 5D,Canon 20D,Nikon D200,Nikon D700,Canon 40D,Canon 50D,Nikon D300], Canon : [Canon HF20,Canon SD800,Canon A570,Canon G10,Canon G11], Ikelite : [Olympus FE-360,Canon 20D,Canon Rebel 350 / XT,Nikon D300,Canon Rebel 400 / XTi,Canon 30D,Canon 5D,Nikon D200,Nikon D40,Nikon D40x,Nikon D60,Olympus SP-510,Olympus E-500,Canon G9,Nikon P5000,Nikon P5100,Nikon D80,Nikon D90,Nikon P6000,Nikon D700,Canon 40D,Canon 50D,Canon G10,Canon 5D Mark II,Canon Rebel 500 / T1i,Canon Rebel 450 / XSi], Sony : [Sony W300] }; $.each( items, function(brand){ $(select[name='manufacturer']).append('option value=' + brand + '' + brand + '/option'); }); $(select[name='manufacturer']).change( function(){ $ }); }); So, that is populating the first. Great. Now, it's a matter of finding the chosen value and then adding the elements of the array to the select. A nudge anyone? Thanks Steffan
[jQuery] Re: Selects populating other selects from JSON data
on 9/11/09 8:02 PM, Steffan Cline at stef...@hldns.com wrote: on 9/11/09 5:15 PM, Steffan Cline at stef...@hldns.com wrote: Perhaps I am not Googling correctly to find the data I am after. I want to have a select that upon making a choice will add elements to a second select. I've seen code to do this using ajax calls but what if I embed the data into the page in a JSON format? I am looking for a good example of this. Anyone seen one? Ok, getting closer: $(document).ready(function () { var items = {Aquatech : [Canon 5D Mark II,Nikon D3,Nikon D3x,Canon 1D,Canon 1Ds,Canon 1Ds Mark II,Canon 1Ds Mark III,Canon 1D Mark III,Canon 30D,Canon EOS 5D,Canon 20D,Nikon D200,Nikon D700,Canon 40D,Canon 50D,Nikon D300], Canon : [Canon HF20,Canon SD800,Canon A570,Canon G10,Canon G11], Ikelite : [Olympus FE-360,Canon 20D,Canon Rebel 350 / XT,Nikon D300,Canon Rebel 400 / XTi,Canon 30D,Canon 5D,Nikon D200,Nikon D40,Nikon D40x,Nikon D60,Olympus SP-510,Olympus E-500,Canon G9,Nikon P5000,Nikon P5100,Nikon D80,Nikon D90,Nikon P6000,Nikon D700,Canon 40D,Canon 50D,Canon G10,Canon 5D Mark II,Canon Rebel 500 / T1i,Canon Rebel 450 / XSi], Sony : [Sony W300] }; $.each( items, function(brand){ $(select[name='manufacturer']).append('option value=' + brand + '' + brand + '/option'); }); $(select[name='manufacturer']).change( function(){ $ }); }); So, that is populating the first. Great. Now, it's a matter of finding the chosen value and then adding the elements of the array to the select. A nudge anyone? This is ugly but works. Any suggestions on how to shorten it? $(document).ready(function () { var items = {Aquatech : [Canon 5D Mark II,Nikon D3,Nikon D3x,Canon 1D,Canon 1Ds,Canon 1Ds Mark II,Canon 1Ds Mark III,Canon 1D Mark III,Canon 30D,Canon EOS 5D,Canon 20D,Nikon D200,Nikon D700,Canon 40D,Canon 50D,Nikon D300], Canon : [Canon HF20,Canon SD800,Canon A570,Canon G10,Canon G11], Ikelite : [Olympus FE-360,Canon 20D,Canon Rebel 350 / XT,Nikon D300,Canon Rebel 400 / XTi,Canon 30D,Canon 5D,Nikon D200,Nikon D40,Nikon D40x,Nikon D60,Olympus SP-510,Olympus E-500,Canon G9,Nikon P5000,Nikon P5100,Nikon D80,Nikon D90,Nikon P6000,Nikon D700,Canon 40D,Canon 50D,Canon G10,Canon 5D Mark II,Canon Rebel 500 / T1i,Canon Rebel 450 / XSi], Sony : [Sony W300] }; $.each( items, function(brand){ $(select[name='manufacturer']).append('option value=' + brand + '' + brand + '/option'); }); $(select[name='manufacturer']).change( function(x){ var man = this.value; $.each( items, function(brand, model){ if(brand==man) { $(select[name='model']).empty(); $.each(model, function (){ $(select[name='model']).append('option value=' + this + '' + this + '/option') }); } }); }); }); Thanks Steffan
[jQuery] Re: JCarouselLite - pause scrolling
on 9/6/09 11:54 PM, Jonathan Vanherpe (T T NV) at jonat...@tnt.be wrote: Steffan A. Cline wrote: on 8/28/09 5:37 PM, Steffan Cline at stef...@hldns.com wrote: I have a carousel that auto scrolls images. I was asked if there is a way to make it so that if you mouse over the carousel, it stops and when you mouse out, it starts up again. Is this possible? Anyone? Thanks Steffan The plain jcarousel has this option: http://sorgalla.com/projects/jcarousel/examples/static_auto.html Jonathan Thanks. I saw that option but I have already integrated the lite version :( I hope the author of the lite version speaks up. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Overlaying an element
I have a form where check boxes are working like radio dials. I have that working fine. I even have it where text is appended to the unchecked check boxes to show it's selected elsewhere in the BIG form. I was asked if I could overlay a graphic over the unchecked checkboxes essentially hiding them until the original item is unchecked. Here is how I am doing it with just text. $('input[value*=||]').change(function(){ var $this = $(this),val = $this.val().split('||')[2]; $('input:checkbox[value*=' + val + ']').not($(this)).attr(checked, false); if($('input:checkbox:checked[value*=' + val + ']').length 0) { $('input:checkbox[value*=' + val + '] p').remove(); $('input:checkbox[value*=' + val + ']').not($(this)).append(pAlready in cart!/p); } else $('input:checkbox[value*=' + val + '] p').remove(); }); // change I know it's confusing so I figured the code above would help. It was requested to remove the other checkboxes but I think that's too complicated to remove and then restore them. I thought placing a Already in cart image overlaying the checkbox would be better since all I am doing is dynamically adding and removing it. Any suggestions are much appreciated. Thanks Steffan
[jQuery] Re: JCarouselLite - pause scrolling
on 8/28/09 5:37 PM, Steffan Cline at stef...@hldns.com wrote: I have a carousel that auto scrolls images. I was asked if there is a way to make it so that if you mouse over the carousel, it stops and when you mouse out, it starts up again. Is this possible? Anyone? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: Replacing like items
on 8/31/09 10:42 AM, mkmanning at michaell...@gmail.com wrote: Play around with this: $('input[value*=||]').change(function(){ var $this = $(this),val = $this.val().split('||')[1]; if($this.is(':checked')){ $this.removeAttr('disabled').siblings('input[value$='+val+']').attr ('disabled','disabled'); } else { $this.siblings('input[value$='+val+']').removeAttr('disabled'); } }); This looks like it should work. I'm trying to figure out why it's not. There are no js errors either. What you're trying to do is make checkboxes behave like radio buttons, so why not just use radios, as they're far more appropriate for selecting only one of several choices? While you are right about making it behave like radio dials, it's a complex form and its unfortunately not my call. :-( On Aug 30, 12:44 pm, Steffan A. Cline stef...@hldns.com wrote: I have a form of data I am working on where I may have *nearly* the same thing appear with a checkbox appear multiple times. For example: input type=checkbox name=blah value=widget1||123456 input type=checkbox name=blah value=widget2||123456 input type=checkbox name=blah value=widget3||123456 input type=checkbox name=blah value=widget4||123456 input type=checkbox name=blah value=widget5||123456 So, if checkbox #1 (widget1) is checked, it will either disable all other ones containing the sku 123456 OR replace the others in the form having sku 123456 with an image of a sort. Is there a way to select this without iterating through every checkbox in the form and looking at it's value? Thanks Steffan Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: JqModal / simpleModal - maintaining form state
on 8/31/09 5:27 PM, Eric Martin at emarti...@gmail.com wrote: If you are referring to the known issues I mentioned - since they are browser issues, Eric, thanks for the response. What issues did you mention that I missed? you'd need to implement something that woul keep track of state in those browsers. What code have you used for this? Just copy all values into an array on close and reset on open? On Aug 31, 6:45 am, Steffan A. Cline stef...@hldns.com wrote: on8/30/09 12:48 PM, Steffan Cline at stef...@hldns.com wrote: I have tried both of these modal solutions, beautiful by the way, and found a small problem with both of them and am wondering if there is a work around. I have a form where there are a bunch of check boxes that I have enclosed in a div that I am using for my popup modal. Now the thing is that while the modal is up and I check a bunch of boxes and then close the modal, reopen again, all checkboxes have been reset rather than retaining their state. Is there a way to circumvent this behavior? So, if I click checkbox #1 and close the modal and then reopen the modal, checkbox #1 is no longer checked. I need it to maintain it's state. Any suggestions? Thanks Steffan I tried a couple other modal type plugins and seem to have the same issues. Has anyone seen this before? Is there a work around? Thanks Steffan Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: JqModal / simpleModal - maintaining form state
on 9/1/09 8:33 AM, Eric Martin at emarti...@gmail.com wrote: If you are referring to the known issues I mentioned - since they are browser issues, Eric, thanks for the response. What issues did you mention that I missed? http://www.ericmmartin.com/projects/simplemodal_v12/#othernotes [under Known Issues] you'd need to implement something that woul keep track of state in those browsers. What code have you used for this? Just copy all values into an array on close and reset on open? I haven't had the need to solve this problem, so I don't have any code to share. So, you'd need to write something to save the state of radio buttons in both IE6 and IE7 and checkboxes in IE6. -Eric Ok. I had not seen there was a persist option. Sorry 'bout that. I'll give it a shot. In my case, I am using checkboxes and I do not believe that there is intent to support IE6 at this time. I noticed the issue when testing with Safari and Firefox. I'll implement the persist option and see if it helps. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: JqModal / simpleModal - maintaining form state
on 8/30/09 12:48 PM, Steffan Cline at stef...@hldns.com wrote: I have tried both of these modal solutions, beautiful by the way, and found a small problem with both of them and am wondering if there is a work around. I have a form where there are a bunch of check boxes that I have enclosed in a div that I am using for my popup modal. Now the thing is that while the modal is up and I check a bunch of boxes and then close the modal, reopen again, all checkboxes have been reset rather than retaining their state. Is there a way to circumvent this behavior? So, if I click checkbox #1 and close the modal and then reopen the modal, checkbox #1 is no longer checked. I need it to maintain it's state. Any suggestions? Thanks Steffan I tried a couple other modal type plugins and seem to have the same issues. Has anyone seen this before? Is there a work around? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Replacing like items
I have a form of data I am working on where I may have *nearly* the same thing appear with a checkbox appear multiple times. For example: input type=checkbox name=blah value=widget1||123456 input type=checkbox name=blah value=widget2||123456 input type=checkbox name=blah value=widget3||123456 input type=checkbox name=blah value=widget4||123456 input type=checkbox name=blah value=widget5||123456 So, if checkbox #1 (widget1) is checked, it will either disable all other ones containing the sku 123456 OR replace the others in the form having sku 123456 with an image of a sort. Is there a way to select this without iterating through every checkbox in the form and looking at it's value? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] JqModal / simpleModal - maintaining form state
I have tried both of these modal solutions, beautiful by the way, and found a small problem with both of them and am wondering if there is a work around. I have a form where there are a bunch of check boxes that I have enclosed in a div that I am using for my popup modal. Now the thing is that while the modal is up and I check a bunch of boxes and then close the modal, reopen again, all checkboxes have been reset rather than retaining their state. Is there a way to circumvent this behavior? So, if I click checkbox #1 and close the modal and then reopen the modal, checkbox #1 is no longer checked. I need it to maintain it's state. Any suggestions? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] JqModal
Using the very basic jqModal example, isn't it supposed to auto size and auto center the modal on the page? I placed a table that was wider than the modal's default settings and it's off the page and does not create scroll bars on the page to see the hidden section of the modal. The default class is .jqmWindow { display: none; position: fixed; top: 17%; left: 50%; margin-left: -300px; width: 600px; background-color: #EEE; color: #333; border: 1px solid black; padding: 12px; } Now, I know I can change the width of the modal but what about the positioning? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] JCarouselLite - pause scrolling
I have a carousel that auto scrolls images. I was asked if there is a way to make it so that if you mouse over the carousel, it stops and when you mouse out, it starts up again. Is this possible? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: UI Tabs and a submit button
on 11/11/08 4:14 AM, Klaus Hartl at [EMAIL PROTECTED] wrote: That's pure CSS. I suggest to use absolute positioning. A container holds the tabs stuff and the button, the button itself is positioned to the top and right of the container. div id=container ... /div #container { position: relative; } #submit { position: absolute; top: 0; right: 0; } --Klaus On 11 Nov., 07:17, Steffan A. Cline [EMAIL PROTECTED] wrote: on 11/9/08 10:31 PM, Steffan Cline at [EMAIL PROTECTED] wrote: Is it possible to place a submit button on the same line as a row of tabs using the ui tabs? | tab1 | tab2 | tab3 | tab4 | (submit button) |--| Any suggestions? No takers? Thank you Klaus. As always, you are a big help. This worked great. I just wasn't sure if there was another approach by modifying the html to put the button in a tab or something. I'll have to check to make sure it works in IE but seems good in Safari and FF. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: UI Tabs and a submit button
on 11/9/08 10:31 PM, Steffan Cline at [EMAIL PROTECTED] wrote: Is it possible to place a submit button on the same line as a row of tabs using the ui tabs? | tab1 | tab2 | tab3 | tab4 | (submit button) |--| Any suggestions? No takers? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: Count of checked checkboxes
on 11/9/08 5:31 PM, Karl Swedberg at [EMAIL PROTECTED] wrote: Hi Steffan, I think you're missing the colon in front of checkbox. Should be: $(:checkbox:checked).length or $(input:checkbox:checked).length --Karl On Nov 9, 2008, at 7:07 PM, Steffan A. Cline wrote: Does anyone have a quick trick for getting a count of all checked checkboxes? I tried $(checkbox:checked).length and I always get 0. Is there a trick for this? Thanks Steffan What is the difference between what you posted and $([EMAIL PROTECTED]@checked]).size() Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] UI Tabs and a submit button
Is it possible to place a submit button on the same line as a row of tabs using the ui tabs? | tab1 | tab2 | tab3 | tab4 | (submit button) |--| Any suggestions? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Count of checked checkboxes
Does anyone have a quick trick for getting a count of all checked checkboxes? I tried $(checkbox:checked).length and I always get 0. Is there a trick for this? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: Ajax Tabs - programmatically change URL
on 10/6/08 7:35 PM, Steffan Cline at [EMAIL PROTECTED] wrote: on 10/6/08 6:59 PM, Steffan Cline at [EMAIL PROTECTED] wrote: I have a calendaring solution where within tabs are different views such as day, week, work week and month. I want to make the monthly view's days be links to change the view to the day tab and append something to the ajax url. For example: In month view, the user clicks on October 3. A link executes $('#container').triggerTab(1); BUT the ajax url on the tab is day.lasso I would need to append ?date=20081003. The actual date would be set in the link that calls the tab. Any suggestions? RTFM? Well, I see the syntax changed for selecting a tab. I got that but... Is there a single call to select a tab AND change the url all in one shot? Ok... RTFM answers most questions... .tabs('url'.0,'/new/url').tabs('select',0) It'd be cool if there was a combo method but this works well. =D Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Tabs and scrollTo()
Ok... Getting close here... I have a structure of scrollable divs in ajax ui.tabs div style=overflow:scroll id=day1 ... /div div style=overflow:scroll id=day2 a name=first2/a /div div style=overflow:scroll id=day3 a name=first3/a /div div style=overflow:scroll id=day4 ... /div ... Now, I have it set up to scroll to the top of each div: $().ready(function() { $('#tabs ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' }, load: function () {$('#dialog').jqmAddTrigger('a.details',this) }, show: function () { for( var i=1; i=7; i++ ) if( $(#day+i).length $(a[name=first+i+]).length ) $(#day+i).scrollTo( $(a[name=first+i+]), 0 ); } }); $('#dialog').jqm({ ajax: '@href' }); }); Moving the scrollTo() into show helped it at least scroll but the problem I am running into is that scrollTo() always skips first2 and will scroll first3. I can't figure out why. Any ideas? Also, is there a good way to simplify the for loop with a .each() function? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Ajax Tabs - programmatically change URL
I have a calendaring solution where within tabs are different views such as day, week, work week and month. I want to make the monthly view's days be links to change the view to the day tab and append something to the ajax url. For example: In month view, the user clicks on October 3. A link executes $('#container').triggerTab(1); BUT the ajax url on the tab is day.lasso I would need to append ?date=20081003. The actual date would be set in the link that calls the tab. Any suggestions? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: Ajax Tabs - programmatically change URL
on 10/6/08 6:59 PM, Steffan Cline at [EMAIL PROTECTED] wrote: I have a calendaring solution where within tabs are different views such as day, week, work week and month. I want to make the monthly view's days be links to change the view to the day tab and append something to the ajax url. For example: In month view, the user clicks on October 3. A link executes $('#container').triggerTab(1); BUT the ajax url on the tab is day.lasso I would need to append ?date=20081003. The actual date would be set in the link that calls the tab. Any suggestions? RTFM? Well, I see the syntax changed for selecting a tab. I got that but... Is there a single call to select a tab AND change the url all in one shot? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: Ajax Tabs and jqModal
on 9/30/08 2:03 PM, Klaus Hartl at [EMAIL PROTECTED] wrote: On 30 Sep., 18:25, Steffan A. Cline [EMAIL PROTECTED] wrote: Thanks for the quick answer! I did realize that the issue was that the items did not exist at the time of binding. I am new to jQuery and am trying to understand all the nice amenities we have now in comparison to hand coding all of this. I tried to implement your example as a drop in and it seemed to make no difference. Was there supposed to be more for me to add? Yes there was... :) The line where you initialize the dialog must be repeated in the load callback. Theoretically that is, because I'm not sure how the jqModel plugin works. But I just learned that you can safely reinitialize a modal, thus the following code should work (albeit untested): $(function() { var dialogify = function() { $('#dialog').jqm({ajax: '@href', trigger: 'a.details'}); }; dialogify(); $('#tabs ul').tabs({ load: dialogify, fx: { height: 'toggle', opacity: 'toggle' } }); }); HTH --Klaus Ok... I really didn't get anywhere. I tried several different ways to make this work. Would it be good to look up the author of jqModal and ask about this? The most I have been able to do is to get load to load once. It didn't work for each tab as selected. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Ajax Tabs and jqModal
I have a scenario where I am using the jQuery UI tabs via ajax. The problem I am running into is that with this code: $().ready(function() { $('#tabs ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } }); $('#dialog').jqm({ajax: '@href', trigger: 'a.details'}); }); I am binding the jqmodal action to the existing links with the details class BUT problem is that items loaded via ajax do not subsequently get bound. Is there a trick to make jqmodal attach the links after each ajax call has been done? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: Ajax Tabs and jqModal
on 9/30/08 8:17 AM, Klaus Hartl at [EMAIL PROTECTED] wrote: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_workin g_after_an_AJAX_request.3F If you choose to use rebinding, you would use the tabs load callback for that. $('#tabs ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' }, load: function(e, ui) { // rebind... $('a', ui.panel); // = all links inside loaded tab content } }); --Klaus On 30 Sep., 16:20, Steffan A. Cline [EMAIL PROTECTED] wrote: I have a scenario where I am using the jQuery UI tabs via ajax. The problem I am running into is that with this code: $().ready(function() { $('#tabs ul').tabs({ fx: { height: 'toggle', opacity: 'toggle' } }); $('#dialog').jqm({ajax: '@href', trigger: 'a.details'}); }); I am binding the jqmodal action to the existing links with the details class BUT problem is that items loaded via ajax do not subsequently get bound. Is there a trick to make jqmodal attach the links after each ajax call has been done? Thanks Steffan Klaus, Thanks for the quick answer! I did realize that the issue was that the items did not exist at the time of binding. I am new to jQuery and am trying to understand all the nice amenities we have now in comparison to hand coding all of this. I tried to implement your example as a drop in and it seemed to make no difference. Was there supposed to be more for me to add? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: Ajax Tabs and jqModal
on 9/30/08 2:03 PM, Klaus Hartl at [EMAIL PROTECTED] wrote: On 30 Sep., 18:25, Steffan A. Cline [EMAIL PROTECTED] wrote: Thanks for the quick answer! I did realize that the issue was that the items did not exist at the time of binding. I am new to jQuery and am trying to understand all the nice amenities we have now in comparison to hand coding all of this. I tried to implement your example as a drop in and it seemed to make no difference. Was there supposed to be more for me to add? Yes there was... :) The line where you initialize the dialog must be repeated in the load callback. Theoretically that is, because I'm not sure how the jqModel plugin works. But I just learned that you can safely reinitialize a modal, thus the following code should work (albeit untested): $(function() { var dialogify = function() { $('#dialog').jqm({ajax: '@href', trigger: 'a.details'}); }; dialogify(); $('#tabs ul').tabs({ load: dialogify, fx: { height: 'toggle', opacity: 'toggle' } }); }); HTH --Klaus No dice. It does not even bind at all now. Not sure why. I'll have to play around with some more. Any other ideas? I'll see if I can find a way to post an example. Problem is the live data. :( Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: jQuery test suite on new Google Chrome browser
on 9/3/08 7:19 AM, Andy Matthews at [EMAIL PROTECTED] wrote: According to getclicky.com, Chrome already has an almost 3% market share: getclicky.com/chrome/ -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Wednesday, September 03, 2008 9:01 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jQuery test suite on new Google Chrome browser It's funny how quickly people begin to forget how Firefox is the only browser to-date that has been able to wrestle any market share from Microsoft and force Microsoft back to the standards table. Yep, let's find a way for Google to kill Mozilla. Good thinking Bill. Rey... Bil Corry wrote: Guy Fraser wrote on 9/3/2008 5:22 AM: I think everyone is missing the whole point of Chrome: It's designed to kill MSIE on corporate networks - http://tinyurl.com/68lvhb Converting a few FF users over and saving on the USD $60+ million Google pays Mozilla every year probably doesn't hurt either... - Bil I think that 3% is bloated. Not sure if it was here or another list but someone posted that Chrome is sending the headers for AppleWebKit Safari. It would seem google needs to change this so they can receive the actual due credit rather than reap glory at Safari's expense. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: Using Validate with jqGrid
on 9/1/08 11:52 AM, Tony at [EMAIL PROTECTED] wrote: Hello, There is email checking in the last version. Sorry, I didn't know this. It was not in the forums or manual. As for the ajax you can use beforeSubmit event for this purpose Have any examples or binding an ajax validation? I have a registration form which verifies a username before continuing. Well, in the jqGrid, I also have this as a field that can be entered but also needs the same validation. So, in this case a demo or example would be a BIG help. Regards Tony On Aug 31, 10:30 pm, Steffan A. Cline [EMAIL PROTECTED] wrote: on 8/31/08 12:50 AM, Tony at [EMAIL PROTECTED] wrote: Hello, The grid has build in fuctionality for validation. Also check the docs for formediting. Regards Tony On Aug 31, 8:06 am, Steffan A. Cline [EMAIL PROTECTED] wrote: Has anyone devised a way to have the grid use validate for the edit and add forms? Thanks Steffan While it does, I need some of the increased functionality of Validate. For example, you do not have an option for testing things via ajax or email addresses, that is unless I missed them. Thanks Steffan Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: Using Validate with jqGrid
on 8/31/08 12:50 AM, Tony at [EMAIL PROTECTED] wrote: Hello, The grid has build in fuctionality for validation. Also check the docs for formediting. Regards Tony On Aug 31, 8:06 am, Steffan A. Cline [EMAIL PROTECTED] wrote: Has anyone devised a way to have the grid use validate for the edit and add forms? Thanks Steffan While it does, I need some of the increased functionality of Validate. For example, you do not have an option for testing things via ajax or email addresses, that is unless I missed them. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] [Validate] Using Validate with jqGrid
Has anyone devised a way to have the grid use validate for the edit and add forms? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] [Validate] Maximum call stack size exceeded.
Jörn, Ok, I am not sure which lib is causing the error. I am using the latest of jQuery and Validate. I get the console error Maximum call stack size exceeded. This appears in the error pane of Coda which uses WebKit for rendering. Below is the code in my head if it helps track the issue down. $.validator.setDefaults({ submitHandler: function(form) { $(#loginBtn).hide(slow); $(form).submit(); }, errorClass : error }); $().ready(function() { $(#logon).validate({ rules: { username: { required: true, minlength: 4 }, password: { required: true, minLength: 5 } }, messages: { username: { required: Please enter a username, minLength: Your username must consist of at least 4 characters }, password: { required: Please provide a password, minLength: Your password must be at least 5 characters long } } }); $(input[name=username]).focus(); } ) What can be done to alleviate this error? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] [validate]
Jörn, Just an FYI, in looking thru the documentation I see that between the jQuery format and the original format that there are missing elements that need to be added. For example, on here : http://docs.jquery.com/Plugins/Validation You do not have a section for errorClass, errorPlacement, errorLabelContainer or errorElement. I only came across these in the BRIEF description under Error message Display. There are no examples. Can you please make sure that ALL of them are listed? I am a novice with jQuery and have no idea about these options. Are there any I am missing from the list I was able to pick out above? I appreciate your hard work on this plugin and look forward to continuing to use this awesome plugin. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: [validate] validating dynamically created fields
on 2/2/08 3:33 PM, Steffan A. Cline at [EMAIL PROTECTED] wrote: on 2/1/08 1:49 PM, Jörn Zaefferer at [EMAIL PROTECTED] wrote: Steffan A. Cline schrieb: on 2/1/08 1:10 PM, Jörn Zaefferer at [EMAIL PROTECTED] wrote: Steffan A. Cline schrieb: I have a form in multiple sections. The validation declarations are in the head as the demos show. Problem is that I have a section where there are multiple groups of dynamically created file inputs. The IDs vary and the types of files for each group will vary. An Id may be like this id=cv_fi_1_2. They are coded this way so that on the server side I can handle the file types appropriately. Is there a trick where I could define each group with it's own class or something and then tell the validator to handle file inputs with a certain class attribute? Or to tell it to look for a specific div ID containing the file inputs and validate them accordingly to the group? Here is an example All of these are in the same form and are generated server side number will vary. Is having the rules in the head a requirement? If not, it would be easy to just add them as classes/attributes, an example is here: http://jquery.bassistance.de/validate/demo/dynamic-totals.html Though even then I'm not exactly sure if it would work, considering that all have the same name, which is currently not supported by the validation plugin. Jörn The names could all be made dynamic as well. Since they are file inputs, they are uniquely handled server side. I'll look at the examples and see how it works out. Okay, great. Let me know if the issue remains. Jörn Ok, question. On that demo link you gave me I see you have class=quantity required and class=required. Where is it that you are defining what the rules are for that class? For example, I pointed out that I needed validation for individual elements. One file input is PDF only while another is .mpg|.mov|.fla and the other is .jpg|.gif. This is interesting though. I'm curious to see how you suggest doing it. Thanks Steffan Jörn, Would it be something like this in the head? jQuery.validator.addClassRules({ brochure: { accept: pdf }, movie: { accept: mov|mpg|mpeg|fla|mp4 }, photo: { accept: jpg|gif } }); Then in the body? input type=file name=somethingdynamic class=photo / input type=file name=somethingdynamic class=movie / input type=file name=somethingdynamic class=brochure / Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: [validate] validating dynamically created fields
on 2/1/08 1:49 PM, Jörn Zaefferer at [EMAIL PROTECTED] wrote: Steffan A. Cline schrieb: on 2/1/08 1:10 PM, Jörn Zaefferer at [EMAIL PROTECTED] wrote: Steffan A. Cline schrieb: I have a form in multiple sections. The validation declarations are in the head as the demos show. Problem is that I have a section where there are multiple groups of dynamically created file inputs. The IDs vary and the types of files for each group will vary. An Id may be like this id=cv_fi_1_2. They are coded this way so that on the server side I can handle the file types appropriately. Is there a trick where I could define each group with it's own class or something and then tell the validator to handle file inputs with a certain class attribute? Or to tell it to look for a specific div ID containing the file inputs and validate them accordingly to the group? Here is an example All of these are in the same form and are generated server side number will vary. Is having the rules in the head a requirement? If not, it would be easy to just add them as classes/attributes, an example is here: http://jquery.bassistance.de/validate/demo/dynamic-totals.html Though even then I'm not exactly sure if it would work, considering that all have the same name, which is currently not supported by the validation plugin. Jörn The names could all be made dynamic as well. Since they are file inputs, they are uniquely handled server side. I'll look at the examples and see how it works out. Okay, great. Let me know if the issue remains. Jörn Ok, question. On that demo link you gave me I see you have class=quantity required and class=required. Where is it that you are defining what the rules are for that class? For example, I pointed out that I needed validation for individual elements. One file input is PDF only while another is .mpg|.mov|.fla and the other is .jpg|.gif. This is interesting though. I'm curious to see how you suggest doing it. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] [validate] validating dynamically created fields
I have a form in multiple sections. The validation declarations are in the head as the demos show. Problem is that I have a section where there are multiple groups of dynamically created file inputs. The IDs vary and the types of files for each group will vary. An Id may be like this id=cv_fi_1_2. They are coded this way so that on the server side I can handle the file types appropriately. Is there a trick where I could define each group with it's own class or something and then tell the validator to handle file inputs with a certain class attribute? Or to tell it to look for a specific div ID containing the file inputs and validate them accordingly to the group? Here is an example All of these are in the same form and are generated server side number will vary. Group 1 Filter for .jpg | .gif input type=file name=myfile id=cp_fi_1_2034 onchange=handleFile(this); / input type=file name=myfile id=cp_fi_2_2123 onchange=handleFile(this); / input type=file name=myfile id=cp_fi_3_3456 onchange=handleFile(this); / input type=file name=myfile id=cp_fi_4_7890 onchange=handleFile(this); / Group 2 Filter for .mov | .mpg input type=file name=myfile id=cv_fi_1_1234 onchange=handleFile(this); / input type=file name=myfile id=cv_fi_2_5678 onchange=handleFile(this); / Group 3 Filter for .pdf input type=file name=myfile id=cb_fi_1_3210 onchange=handleFile(this); / input type=file name=myfile id=cb_fi_2_3345 onchange=handleFile(this); / input type=file name=myfile id=cb_fi_3_3456 onchange=handleFile(this); / It's hard to declare these in the head and down here as well. Any suggestions? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: File inputs
on 2/1/08 2:13 AM, Mika Tuupola at [EMAIL PROTECTED] wrote: On Jan 31, 2008, at 5:59 PM, Steffan A. Cline wrote: Works in FF-Mac, Safari-Mac, IE67-PC I wish this could be incorporated into the jQuery plugin. I am not that well versed yet enough to do this. While basic it could be done to have a dummy field that strips the path and shows just the file name. That is my plan on the real page. Just out of interest. Have you seen this: http://www.appelsiini.net/projects/filestyle http://www.appelsiini.net/projects/filestyle/demo.html -- Mika Tuupola http://www.appelsiini.net/ I had looked at that but this one has the actual file field where I did not want that. Here is a screenshot. Hitting Add pops up the file selector. Delete will empty the dummy field. Upon submit the server side processing handles the remainder. This however brings me to the validation issue for another post. How can I validate in a specific manner the file types of these since they are not fixed. I do not see an easy way to declare the fields to be tested at the top and then test write in the matching ID as declared in the top. I wonder if it¹s possible to tie validation to an object based on it¹s class. Reason is that I have multiple items on the page which all have different files accepted. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member --- inline: image.png
[jQuery] Re: [validate] validating dynamically created fields
on 2/1/08 1:10 PM, Jörn Zaefferer at [EMAIL PROTECTED] wrote: Steffan A. Cline schrieb: I have a form in multiple sections. The validation declarations are in the head as the demos show. Problem is that I have a section where there are multiple groups of dynamically created file inputs. The IDs vary and the types of files for each group will vary. An Id may be like this id=cv_fi_1_2. They are coded this way so that on the server side I can handle the file types appropriately. Is there a trick where I could define each group with it's own class or something and then tell the validator to handle file inputs with a certain class attribute? Or to tell it to look for a specific div ID containing the file inputs and validate them accordingly to the group? Here is an example All of these are in the same form and are generated server side number will vary. Is having the rules in the head a requirement? If not, it would be easy to just add them as classes/attributes, an example is here: http://jquery.bassistance.de/validate/demo/dynamic-totals.html Though even then I'm not exactly sure if it would work, considering that all have the same name, which is currently not supported by the validation plugin. Jörn The names could all be made dynamic as well. Since they are file inputs, they are uniquely handled server side. I'll look at the examples and see how it works out. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: File inputs
on 1/31/08 1:52 AM, Diego A. at [EMAIL PROTECTED] wrote: I've tried for a long time to do this and as far as I know: it just can't be done. Perhaps the next generation of browsers will allow us developers to call the file seclection box like this window.chooseFile, just like we can use window.prompt... If this does turn out to be possible, eventually, then I'll add it to my multiple file upload plugin... On Jan 30, 4:11 am, Steffan A. Cline [EMAIL PROTECTED] wrote: on 1/29/08 7:58 PM, Hamish Campbell at [EMAIL PROTECTED] wrote: Some code would be useful - you've said that .click() doesn't work in FF, but it probably isn't the .click() bit that isn't working. One suggestion (untested) is that you include both the normal button and the new image, but hide the image with CSS by default. This means that if JS is disabled, the user can still click the normal button. Then with jQuery, hide the button and show the image on document.ready. Then apply a trigger to the image that fires the normal button action. It means you shouldn't need to code anything special - just piggy-back on the usual action of the button. Eg: $(#myImage).click(function () { $(#fileButton).trigger('click'); }); On Jan 30, 8:01 am, Steffan A. Cline [EMAIL PROTECTED] wrote: on 1/29/08 11:57 AM, Mika Tuupola at [EMAIL PROTECTED] wrote: On Jan 29, 2008, at 7:08 PM, Steffan A. Cline wrote: I know there is a plug-in for styling file inputs but what about using a custom image instead? I need to do something where I have an ADD and a DELETE button side by side. I tried this using .click() and it worked flawlessly but alas FF does not support it! How stupid!. What are you trying to achieve? What does ADD and DELETE buttons do? -- Mika Tuupola http://www.appelsiini.net/ The add button would simply pop up the file selector as clicking on the actual file button would do. The delete button would set a hidden flag to remove the stored file. See the previous thread .click() This described the previous method which I gave up on. Thanks Steffan Well, I tried many variations of .click() with FF and according to this link: http://www.quirksmode.org/dom/inputfile.html reads: The click() method allows you to simulate a click on a form field. Checkboxes get toggled, radios selected, and so on. Unfortunately Mozilla and Opera haven't added this method to file upload fields. I wonder why, adding it is not really a security risk since the worst that can happen is that the file selection window pops up. So unfortunately we cannot use this simple solution. I hadn't tried your trigger method. Did you test it in FF? I just did and unfortunately as said on quirksmode that does not work :( but it does on everything else. What else do you suggest? Thanks Steffan I finally figured it out. I have a working version using CSS. style type=text/css!-- .input-file{ position:relative; zoom:1; /*clear float*/ overflow:hidden; /*clear float*/ } .input-file img { cursor: pointer } .input-file label{ float:left; white-space:nowrap; position:relative; z-index:1; left:0; top:0; overflow:hidden; display:inline; cursor: pointer; } .input-file label input{ position:absolute; right:0; top:0; opacity:0; zoom:1; filter:alpha(opacity=0); cursor:pointer; } --/style div class=input-file labelimg src=/add_button.gif border=0 /input type=file name=myfile //labelnbsp;img src=/delete_button.gif border=0 / /div Works in FF-Mac, Safari-Mac, IE67-PC I wish this could be incorporated into the jQuery plugin. I am not that well versed yet enough to do this. While basic it could be done to have a dummy field that strips the path and shows just the file name. That is my plan on the real page. Any thoughts anyone? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] File inputs
I know there is a plug-in for styling file inputs but what about using a custom image instead? I need to do something where I have an ADD and a DELETE button side by side. I tried this using .click() and it worked flawlessly but alas FF does not support it! How stupid!. Any suggestions? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: File inputs
on 1/29/08 11:57 AM, Mika Tuupola at [EMAIL PROTECTED] wrote: On Jan 29, 2008, at 7:08 PM, Steffan A. Cline wrote: I know there is a plug-in for styling file inputs but what about using a custom image instead? I need to do something where I have an ADD and a DELETE button side by side. I tried this using .click() and it worked flawlessly but alas FF does not support it! How stupid!. What are you trying to achieve? What does ADD and DELETE buttons do? -- Mika Tuupola http://www.appelsiini.net/ The add button would simply pop up the file selector as clicking on the actual file button would do. The delete button would set a hidden flag to remove the stored file. See the previous thread .click() This described the previous method which I gave up on. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: File inputs
on 1/29/08 7:58 PM, Hamish Campbell at [EMAIL PROTECTED] wrote: Some code would be useful - you've said that .click() doesn't work in FF, but it probably isn't the .click() bit that isn't working. One suggestion (untested) is that you include both the normal button and the new image, but hide the image with CSS by default. This means that if JS is disabled, the user can still click the normal button. Then with jQuery, hide the button and show the image on document.ready. Then apply a trigger to the image that fires the normal button action. It means you shouldn't need to code anything special - just piggy-back on the usual action of the button. Eg: $(#myImage).click(function () { $(#fileButton).trigger('click'); }); On Jan 30, 8:01 am, Steffan A. Cline [EMAIL PROTECTED] wrote: on 1/29/08 11:57 AM, Mika Tuupola at [EMAIL PROTECTED] wrote: On Jan 29, 2008, at 7:08 PM, Steffan A. Cline wrote: I know there is a plug-in for styling file inputs but what about using a custom image instead? I need to do something where I have an ADD and a DELETE button side by side. I tried this using .click() and it worked flawlessly but alas FF does not support it! How stupid!. What are you trying to achieve? What does ADD and DELETE buttons do? -- Mika Tuupola http://www.appelsiini.net/ The add button would simply pop up the file selector as clicking on the actual file button would do. The delete button would set a hidden flag to remove the stored file. See the previous thread .click() This described the previous method which I gave up on. Thanks Steffan Well, I tried many variations of .click() with FF and according to this link: http://www.quirksmode.org/dom/inputfile.html reads: The click() method allows you to simulate a click on a form field. Checkboxes get toggled, radios selected, and so on. Unfortunately Mozilla and Opera haven't added this method to file upload fields. I wonder why, adding it is not really a security risk since the worst that can happen is that the file selection window pops up. So unfortunately we cannot use this simple solution. I hadn't tried your trigger method. Did you test it in FF? I just did and unfortunately as said on quirksmode that does not work :( but it does on everything else. What else do you suggest? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: .click()
on 1/6/08 11:55 PM, chrismarx at [EMAIL PROTECTED] wrote: best to see the live page- On Jan 6, 9:32 pm, Steffan A. Cline [EMAIL PROTECTED] wrote: on 1/6/08 5:29 PM, chrismarx at [EMAIL PROTECTED] wrote: first, it would be better jquery technique to bind your img outside of the onclick $('#imgID').click(function(){ $('#logo').click(); }); what function is executed when you trigger the click event on the logo input? On Jan 6, 5:46 pm, Steffan A. Cline [EMAIL PROTECTED] wrote: Running into something strange. I have an image with an onclick handler that calls on a hidden input type=file id=logo via img src=xx onclick=$('#logo').click() This works flawlessly in Safari, IE 6 7 but not in FF Mac (not sure about PC). Any ideas? Also, what is the best way when taking this approach? I have it where the file input is in a div. I initially tried using display:none for the container div but the file inputs stopped working. I changed the div to visibility:hidden and height: 0px and it works (with the exception above) anyone have a better suggestion on how to hide these inputs better? I am using jquery 1.1.3.1 Suggestions? Thanks Steffan I am hiding the file inputs and then parsing the data from the file input onchange and placing it into a dummy text field so that there are no paths etc when the end user views it. As you know, some browsers prepend the path to the name in the file input and I wasn't thrilled with that. By trimming the path and displaying only the file name looked more appealing. The end user wants to have their own add/delete buttons for the images rather than the standard choose button. The odd thing is that when I use the DOM inspector in FF it shows that the image has the click attribute so I am not sure why it's not firing. Would it beneficial to show all of the code or is there enough mentioned to see why the click event fails? Odd that FF does not show any errors or warnings in the error console. Thanks Steffan !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head title/title script type=text/javascript src=/js/jquery-1.1.3.1.pack.js/script /head body input type=button onclick=$('#inFile').click() value=Find It div style= input type=file name=test id=inFile /div /body /html As stated it works in Safari and IE67. Any ideas why it fails in Firefox? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: .click()
on 1/21/08 10:31 AM, chrismarx at [EMAIL PROTECTED] wrote: i believe this is expected behavior, it would be a security risk to allow script access to file inputs- On Jan 20, 7:32 pm, Steffan A. Cline [EMAIL PROTECTED] wrote: on 1/6/08 11:55 PM, chrismarx at [EMAIL PROTECTED] wrote: best to see the live page- On Jan 6, 9:32 pm, Steffan A. Cline [EMAIL PROTECTED] wrote: on 1/6/08 5:29 PM, chrismarx at [EMAIL PROTECTED] wrote: first, it would be better jquery technique to bind your img outside of the onclick $('#imgID').click(function(){ $('#logo').click(); }); what function is executed when you trigger the click event on the logo input? On Jan 6, 5:46 pm, Steffan A. Cline [EMAIL PROTECTED] wrote: Running into something strange. I have an image with an onclick handler that calls on a hidden input type=file id=logo via img src=xx onclick=$('#logo').click() This works flawlessly in Safari, IE 6 7 but not in FF Mac (not sure about PC). Any ideas? Also, what is the best way when taking this approach? I have it where the file input is in a div. I initially tried using display:none for the container div but the file inputs stopped working. I changed the div to visibility:hidden and height: 0px and it works (with the exception above) anyone have a better suggestion on how to hide these inputs better? I am using jquery 1.1.3.1 Suggestions? Thanks Steffan I am hiding the file inputs and then parsing the data from the file input onchange and placing it into a dummy text field so that there are no paths etc when the end user views it. As you know, some browsers prepend the path to the name in the file input and I wasn't thrilled with that. By trimming the path and displaying only the file name looked more appealing. The end user wants to have their own add/delete buttons for the images rather than the standard choose button. The odd thing is that when I use the DOM inspector in FF it shows that the image has the click attribute so I am not sure why it's not firing. Would it beneficial to show all of the code or is there enough mentioned to see why the click event fails? Odd that FF does not show any errors or warnings in the error console. Thanks Steffan !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head title/title script type=text/javascript src=/js/jquery-1.1.3.1.pack.js/script /head body input type=button onclick=$('#inFile').click() value=Find It div style= input type=file name=test id=inFile /div /body /html As stated it works in Safari and IE67. Any ideas why it fails in Firefox? Thanks Steffan I fail to see how the .click() could be a security issue that Safari and IE67 missed out on. Is possible that there is a flaw in this version of FF or jQuery? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] .click()
Running into something strange. I have an image with an onclick handler that calls on a hidden input type=file id=logo via img src=xx onclick=$('#logo').click() This works flawlessly in Safari, IE 6 7 but not in FF Mac (not sure about PC). Any ideas? Also, what is the best way when taking this approach? I have it where the file input is in a div. I initially tried using display:none for the container div but the file inputs stopped working. I changed the div to visibility:hidden and height: 0px and it works (with the exception above) anyone have a better suggestion on how to hide these inputs better? I am using jquery 1.1.3.1 Suggestions? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: .click()
on 1/6/08 5:29 PM, chrismarx at [EMAIL PROTECTED] wrote: first, it would be better jquery technique to bind your img outside of the onclick $('#imgID').click(function(){ $('#logo').click(); }); what function is executed when you trigger the click event on the logo input? On Jan 6, 5:46 pm, Steffan A. Cline [EMAIL PROTECTED] wrote: Running into something strange. I have an image with an onclick handler that calls on a hidden input type=file id=logo via img src=xx onclick=$('#logo').click() This works flawlessly in Safari, IE 6 7 but not in FF Mac (not sure about PC). Any ideas? Also, what is the best way when taking this approach? I have it where the file input is in a div. I initially tried using display:none for the container div but the file inputs stopped working. I changed the div to visibility:hidden and height: 0px and it works (with the exception above) anyone have a better suggestion on how to hide these inputs better? I am using jquery 1.1.3.1 Suggestions? Thanks Steffan I am hiding the file inputs and then parsing the data from the file input onchange and placing it into a dummy text field so that there are no paths etc when the end user views it. As you know, some browsers prepend the path to the name in the file input and I wasn't thrilled with that. By trimming the path and displaying only the file name looked more appealing. The end user wants to have their own add/delete buttons for the images rather than the standard choose button. The odd thing is that when I use the DOM inspector in FF it shows that the image has the click attribute so I am not sure why it's not firing. Would it beneficial to show all of the code or is there enough mentioned to see why the click event fails? Odd that FF does not show any errors or warnings in the error console. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: Scrollable table sorter
on 11/17/07 10:44 AM, Steffan A. Cline at [EMAIL PROTECTED] wrote: Can table sorter be configured to scroll add have expandable/shrinkable columns like ExtJS? bump Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Scrollable table sorter
Can table sorter be configured to scroll add have expandable/shrinkable columns like ExtJS? Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Getting started
I am toying around with a form where I am using the validate plugin. http://bassistance.de/jquery-plugins/jquery-plugin-validation/ What I am after is that before a form is submitted, an ajax query must return true/false in order for the form to validate. Example: A select with country codes and names User puts in a phone number Clicks submit Before submittal the form sends an ajax query with the phone number and country code ( from the select's value attribute ) and gets a true/false of whether the phone number contains enough digits for the country code. A server side script validates the required number of digits. Validator will then display something like A phone number for the country you have chosen requires X digits. Where X was returned by the ajax query. I can use json to return the true/false and the number of digits required. Here is what I have been toying with. script type=text/javascript src=jquery-1.2.1.pack.js/script script type=text/javascript src=jquery.validate.pack.js/script script type=text/javascript!-- $().ready(function() { $(#phoneNumberForm).validate({ rules: { phoneNumber: { required: true, minLength: $.get(validate.lasso, { countryCode: $(countryCode).val(), phoneNumber: $(phoneNumber).val() } ) } }, messages: { phoneNumber: { required: Please enter a phoneNumber, minLength: Your phoneNumber must consist of at least 2 characters } } }); }); --/script I have been playing around with the selectors to see if I can submit the correct data to the server at least. The server always says I have submitted undefined for both. I am new to jQuery so I thank any of you for any help you can offer. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline [EMAIL PROTECTED] Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : [EMAIL PROTECTED] GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---