ahah,
>> input type="image" IS a submit button
OK, so i can get rid of the anchor tag, and put onClick="do_login()" for the image tag instead?
Cheers.
Main Topics
Browse All TopicsHi Folks,
I have this form that submits twice for some crazy reason. I just can't work out *why*. The submit is done via an image button that fires a javascript function with onClick() event.
When I watch this action with fiddler tool, I see that the browser posts twice. I can make it post just once if I remove the line
//document.login.submit();
but why does it submit at all? I am assuming that 'image' form field behaves like 'button' - perhaps it realy behaves like 'submit' type?
Any clues will be gratefully accepted!
Thanks and regards, Mike.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
OK,
>> The input type="image" will submit when clicked.
yes, but I also want to prevent a double-click causing multiple submit events, so I am thinking that this would do it:
onClick="return do_login()"
how ironic that I wanted to prevent a double click to cause duplicate POST events, and ended up causing duplicate POST every time! ;-D
Cheers.
Business Accounts
Answer for Membership
by: hieloPosted on 2009-02-08 at 19:34:12ID: 23587181
input type="image" IS a submit button. So you are submitting via the image and via the onclick on the "a" tag. Get rid of the "a" tag.