[jQuery] Re: Disable Submit

2010-01-17 Thread ryan.j
or you can bind to $(#your-form).submit(function({ ... }); if you're making your JS unobtrusive On Jan 16, 6:41 pm, Viz skillipedia skillipe...@googlemail.com wrote: You will need just this tiny js script: function  disableOnSubmit(form ){ for (var i = 0; i form.length; i++){              

Re: [jQuery] Re: Disable Submit

2010-01-16 Thread Viz skillipedia
You will need just this tiny js script: function disableOnSubmit(form ){ for (var i = 0; i form.length; i++){ var e = form.elements[i]; if (e.type.toLowerCase() == button || e.type.toLowerCase() == reset || e.type.toLowerCase() == submit) {

[jQuery] Re: Disable Submit

2010-01-12 Thread MorningZ
Personally i suggest using BlockUI to overlay the whole form... that way 1) not possible for your user to resubmit 2) gives dead obvious indication something is going on 3) simple as can be to use On Jan 12, 2:49 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I have a form i am

RE: [jQuery] Re: Disable Submit

2010-01-12 Thread Dave Maharaj :: WidePixels.com
Ok thanks.sounds good to me. Will check it out. Dave -Original Message- From: MorningZ [mailto:morni...@gmail.com] Sent: January-12-10 4:42 PM To: jQuery (English) Subject: [jQuery] Re: Disable Submit Personally i suggest using BlockUI to overlay the whole form... that way 1

[jQuery] Re: Disable Submit

2010-01-12 Thread MorningZ
Dave here's a quick 2 minute example of this topic and the other topic http://jsbin.com/efona/edit (code) http://jsbin.com/efona (run) very little jQuery to wire that up :-)

[jQuery] Re: Disable Submit

2010-01-12 Thread MorningZ
btw, i forgot to add return false; to the end of both button events there, that would be needed

[jQuery] Re: Disable Submit

2010-01-12 Thread Scott Sauyet
On Jan 12, 2:49 pm, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I have a form i am submitting via Ajax. So after submit while its waiting for response i have my little spinner so user knows something is happening. But how can i disable the submit while its thinking waiting for a

RE: [jQuery] Re: Disable Submit

2010-01-12 Thread Dave Maharaj :: WidePixels.com
Looks good . Thanks will try to add that to my site and see how it goes. Dave -Original Message- From: Scott Sauyet [mailto:scott.sau...@gmail.com] Sent: January-12-10 6:06 PM To: jQuery (English) Subject: [jQuery] Re: Disable Submit On Jan 12, 2:49 pm, Dave Maharaj :: WidePixels.com

[jQuery] Re: Disable submit button with Validation plugin

2009-08-19 Thread fieory
Problem solved.. $().ready(function() { var container = $(div.container); var validator = $(#form_request_item).validate({ errorContainer: container, errorLabelContainer: $(ul, container), wrapper: li, meta: validate, submitHandler: function(form) {

[jQuery] Re: Disable submit button with Validation plugin

2009-08-18 Thread fieory
Hi Jörn, I'm totally newbie to Jquery and i'm using jQuery validation plug-in 1.5.5 written by you to validate form. I've tried to disable submit button based on example given but it didn't work(refer to code below). Then have tried to change form to #form_request_item but it still same. I have

[jQuery] Re: Disable submit button with Validation plugin

2009-08-11 Thread Rich Sturim
thank you Jörn -- that works On Aug 10, 9:01 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Try this: $(document).ready(function() {    $(#myForm).validate({      submitHandler: function(form) {        $(form).find(:submit).attr(disabled, true).attr(value, Submitting...);      

[jQuery] Re: Disable submit button with Validation plugin

2009-08-10 Thread Jörn Zaefferer
Try this: $(document).ready(function() { $(#myForm).validate({ submitHandler: function(form) { $(form).find(:submit).attr(disabled, true).attr(value, Submitting...); form.submit(); } }) }); Jörn On Mon, Aug 10, 2009 at 9:40 AM, Rich Sturimcosmos99...@gmail.com

[jQuery] Re: disable submit not working in IE7

2009-01-27 Thread GBartels
Thanks Mike! Your script mostly works in IE once appended with }); The message displays and the form submits which is what it needs to do. IE still has a little weird behavior in that it takes two clicks to submit the form. On the first click, the form jumps a bit. It's then necessary to

[jQuery] Re: disable submit not working in IE7

2009-01-26 Thread Karl Swedberg
A couple things you might want to look at: 1. Does your button have type=submit ? It will need to if you want to submit with it in IE. 2. The disabled attribute value should be true, not true. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 26,

[jQuery] Re: disable submit not working in IE7

2009-01-26 Thread GBartels
Thank you Karl for the reply. The button is indeed of type=submit and the form was working in IE prior to adding the above script. I also changed the attribute value to true (removing the quotes). Sadly, I'm still getting the same results in IE. On Jan 26, 4:10 pm, Karl Swedberg

[jQuery] Re: disable submit not working in IE7

2009-01-26 Thread Mike Alsup
The button is indeed of type=submit and the form was working in IE prior to adding the above script. I also changed the attribute value to true (removing the quotes). Sadly, I'm still getting the same results in IE. On Jan 26, 4:10 pm, Karl Swedberg k...@englishrules.com wrote: A

[jQuery] Re: Disable Submit Button

2008-10-14 Thread Abel Mohler
The easiest way would be to have an id on the button like: input type=submit id=submit / and then the jQuery would be: $(document).ready(function() { $(#submit).attr(disabled, disabled); }); On Oct 14, 2:12 am, Rahul Sinha [EMAIL PROTECTED] wrote: Hello, Please go through the below given

[jQuery] Re: Disable Submit button if no text entered

2008-05-16 Thread sashabe
Yes, but it seems that the script checks the input length only one time at page load, and then button's state doesn't change if you continue to type or delete input's content. Michael E. Carluen-2 wrote: Another suggestion will be to get the length of the field: var t =

[jQuery] Re: Disable Submit button if no text entered

2008-05-14 Thread andrea varnier
On 14 Mag, 11:01, sashabe [EMAIL PROTECTED] wrote: Hello! hi :) you'd better use the submit() method and 'return false'. Then a quick solution to your problem could look like this: $(document).ready(function(){ $('form').submit(function(){ if ($('input:first', 'form').val() == ''

[jQuery] Re: Disable Submit button if no text entered

2008-05-14 Thread sashabe
Thank you! :) It seems that submit method is not what this case requires because it does the job when user interacts with submit button (correct me please if I'm wrong). The button should be disabled if both field and textarea (now they are id's ;) do not contain any text, to prevent blank

[jQuery] Re: Disable Submit button if no text entered

2008-05-14 Thread Dave Methvin
$('#post_submit').attr('disabled', 'disabled'); $('#post_form').keyup( function () { if ($('#post_name', '#post_form').val() == '' $('#post_content', '#post_form').text() == '') $('#post_submit').attr('disabled', 'disabled'); else ($('#post_submit',

[jQuery] Re: Disable Submit button if no text entered

2008-05-14 Thread sashabe
Thanks!!! That's exactly what I wanted =) Don't know if it's a bug, but with val entering some text in textarea with blank name field activated the button. With text() it stopped to do so. And, as I've read from some of the messages, text() could be more effective when dealing with textarea

[jQuery] Re: Disable Submit button if no text entered

2008-05-14 Thread Michael E. Carluen
Another suggestion will be to get the length of the field: var t = ($('#post_name').val()).length; if (t 0) { $([EMAIL PROTECTED]).removeAttr('disabled'); } This way, you can even have the option of enforcing a minimum char length of the field/s. Michael It seems