[jQuery] (Validation) How to submit a form without validating
Hi, I am using the Jquery validationss plugin for my form validations. Now I have a situation where I have two submit buttons in a single form (say button A and button B). For button A, I want to run validations but for button B I don't want to run the validations and submit the form without validating.. How can i do this? Thanks.
[jQuery] Re: (Validation) How to submit a form without validating
Thanks Jörn , this is exactly what I need. On Jul 16, 12:57 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You can add a class=cancel to that button B. The plugin will then skip the validation. Jörn On Thu, Jul 16, 2009 at 9:05 AM, mnaveedmnaveed...@gmail.com wrote: Hi, I am using the Jquery validationss plugin for my form validations. Now I have a situation where I have two submit buttons in a single form (say button A and button B). For button A, I want to run validations but for button B I don't want to run the validations and submit the form without validating.. How can i do this? Thanks.
[jQuery] (Validation) how to add validation on a select box with auto post
Hi, I have a select box with and onchange event to get the data from serever, SELECT name=States id=Stateonchange=getData(this.value) Now i want to validate that if no value is selected from the above list, then it should not send the ajax request. How can i apply the Jquery validation plugin here? Thanks.
[jQuery] Re: Dynamic Links
sorry I did not clear my point, here is what i want to do, I am running a PHP for loop, which generates a table. In the table, I have a column in which links are generated with an onclick event and the item id is set as parameter, so it looks like this, for(x = 0; xitems.length; x++) // this is a php loop. $str =. 'trtda href=# onclick=getData(items[x].id); Get data /a/td/tr echo($str); this is fine, but no i want to attach an overlay with these links, there is only one overlay on my page which will be displayed when any of the above link is clicked. Data will be loaded from the server. Now how can i pass the current items id from the above link to the jquery methods for overlay? I hope I am able to clear my point.. Thanks. On Jul 12, 10:19 pm, brian bally.z...@gmail.com wrote: On Sun, Jul 12, 2009 at 12:46 PM, mnaveedmnaveed...@gmail.com wrote: Hi, I am new to JQuery, can anyone help how to generatedynamiclinks. I have a loop which generate somelinksand for each, an onclick event is attached, calling a javascript method with some arguments. some thing like this, for(x = 0; xitems.length; x++) a href=# onclick=getData(items[x].id); Get data /a how can i generate such a grid using Jquery. Actually i have to display an overlay on each click, and data will be loaded dynamically in the overlay, so how can i pass the ID to the method? Do you want to create thelinks? Where do you want them appended? One after the other? Or should they be appended to individual elements? If the latter, and let's say you have a structure like so: div class=Items id=item_0foo /div div class=Items id=item_1foo /div div class=Items id=item_2foo /div div class=Items id=item_3foo /div div class=Items id=item_4foo /div ... you needn't create the loop yourself. You could do something like: $(function() { $('.Items').each(function() { $('a href=# title=click me for dataget data/a') .click(function() { alert($(this).parent().attr('id')); }) .appendTo($(this)); }); }); Note that this inside the click handler refers to the link, while the appendTo($(this)) refers to the div.
[jQuery] Re: (Validation) how to add validation on a select box with auto post
I am using the JQuery Validation plug in to validate my form. How can i do this with that? On Jul 13, 1:34 pm, 刘永杰 liuyongjie...@gmail.com wrote: is it difficult?$(#State).val() 2009/7/13 mnaveed mnaveed...@gmail.com Hi, I have a select box with and onchange event to get the data from serever, SELECT name=States id=State onchange=getData(this.value) Now i want to validate that if no value is selected from the above list, then it should not send the ajax request. How can i apply the Jquery validation plugin here? Thanks.
[jQuery] Dynamic Links
Hi, I am new to JQuery, can anyone help how to generate dynamic links. I have a loop which generate some links and for each, an onclick event is attached, calling a javascript method with some arguments. some thing like this, for(x = 0; xitems.length; x++) a href=# onclick=getData(items[x].id); Get data /a how can i generate such a grid using Jquery. Actually i have to display an overlay on each click, and data will be loaded dynamically in the overlay, so how can i pass the ID to the method? Thanks
[jQuery] JQuery Dynamic Validations issue.
Hi, I am using the JQuery validation plug in for form validations. My page contains a loop in which dynamic forms are generated and within each form some text fields are also dynamically generated. I have assigned the id and name attributes both to form and fields with dynamically appending a value. Now I want to apply the validation on all these form, please note that each form contains its own submit button. I have tried using the following selector, $('[class^=commForm]').validate(); // I assigned a class 'commForm' to all the dynamic form. $('[id^=commForm]').validate(); // I assigned id which starts with 'commForm' to all the dynamic form. but none of the above works. Can anyone please help me in this? Thanks.
[jQuery] Re: (Validate) - How to apply validations on dynamically generated forms.
Thanks Jorn, it work fine now...:) On Jul 7, 8:36 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: $(.commForm).each(function() { $(this).validate(); }); The call tovalidateworks only with the first selected element, so you have to do an explicit loop. Jörn On Tue, Jul 7, 2009 at 3:34 PM, mnaveedmnaveed...@gmail.com wrote: Hi, I am using the JQuery validation plug in for form validations. My page contains a loop in which dynamic forms are generated and within each form some text fields are also dynamically generated. I have assigned the id and name attributes both to form and fields with dynamically appending a value. Now I want to apply the validation on all these form, please note that each form contains its own submit button. I have tried using the following selector, $('[class^=commForm]').validate(); // I assigned a class 'commForm' to all the dynamic form. $('[id^=commForm]').validate(); // I assigned id which starts with 'commForm' to all the dynamic form. but none of the above works. Can anyone please help me in this? Thanks.
[jQuery] (Validate) - How to apply validations on dynamically generated forms.
Hi, I am using the JQuery validation plug in for form validations. My page contains a loop in which dynamic forms are generated and within each form some text fields are also dynamically generated. I have assigned the id and name attributes both to form and fields with dynamically appending a value. Now I want to apply the validation on all these form, please note that each form contains its own submit button. I have tried using the following selector, $('[class^=commForm]').validate(); // I assigned a class 'commForm' to all the dynamic form. $('[id^=commForm]').validate(); // I assigned id which starts with 'commForm' to all the dynamic form. but none of the above works. Can anyone please help me in this? Thanks.