Link to home
Start Free TrialLog in
Avatar of pigmentarts
pigmentartsFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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;">


Avatar of ravs120499
ravs120499

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
Avatar of Michel Plungjan
Err no. You need to not disable the submit until the form is actually submitted
ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial