- Aug 7, 2001
- 8,680
- 3
- 0
So I have a form with an image for a submit button. I want to disable the submit button after someone clicks on it and switch the submit button image to something else. Basically this is what I'm doing:
<input type="image" src="1.jpg" onclick="this.disabled=true;this.form.submit();this.src='2.jpg';" />
This works in Firefox for Mac and IE 7. The image doesn't change in Firefox for PC (which isn't a huge deal--most users will be on a Mac). On Safari, the image changes to a missing image icon. The image changes fine if I remove "this.form.submit();" though... but of course the form doesn't work then.
Thanks for any suggestions.
EDIT: Oops, I thought I was in the programming forum. Can someone move this?
<input type="image" src="1.jpg" onclick="this.disabled=true;this.form.submit();this.src='2.jpg';" />
This works in Firefox for Mac and IE 7. The image doesn't change in Firefox for PC (which isn't a huge deal--most users will be on a Mac). On Safari, the image changes to a missing image icon. The image changes fine if I remove "this.form.submit();" though... but of course the form doesn't work then.
Thanks for any suggestions.
EDIT: Oops, I thought I was in the programming forum. Can someone move this?
