• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 554
  • Last Modified:

onclick this.value='Processing... now form is not submitting?

my form did work fine, but now i have added some javascript "onclick" the form no longer seems to submit, although the onclick does change the text. any ideas? thanks

 

<input type="Submit" name="imageUpload" value="Click to Upload"  onclick="this.value='Processing...';this.disabled=true;">


0
pigmentarts
Asked:
pigmentarts
  • 2
1 Solution
 
ravs120499Commented:
You need to return true from the onClick processing. You can either add that inline like this:

onclick="this.value='Processing...';this.disabled=true;return true;".

Or better, create a Javascript function that performs the two statements you have, and then returns true. And change the onClick like this:
onclick="return doOnClick(this);"

- Ravs
0
 
Michel PlungjanIT ExpertCommented:
Err no. You need to not disable the submit until the form is actually submitted
0
 
Michel PlungjanIT ExpertCommented:
Like this

<form action="http://www.google.com/search" onSubmit="this.imageUpload.disabled=true;" >
<input type="text" name="q" value="disable submit submit">
<input type="Submit" name="imageUpload" value="Click to Upload"  onclick="this.value='Processing...';">
</form>
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now