onClick submit for a form not working in Firefox

I know forms of this has been asked tons of times, but I can't seem to make out the fix.  can someone tell me the correction I need to make to my code so that this form will submit in Firefox?  Works fine in IE.  Thsi is a form that uses an image for the submit button.  The form works fine in IE, and it works if you hit "ENTER" in Firefox, but the image button will not fire the submit action....please help.  here is the code...
<table border="0" cellspacing="0" cellpadding="4">
<form name="sform" method="post" action="_search.php">
<td align="center">
<NOBR><span style="font-weight: bold; font-family: Arial, Helvetica, sans-serif">ZIP CODE SEARCH</span></NOBR>
<td><input name="zipcode" type="text" size="20"></td>	
<td><img border="0" src="images/go.gif" width="30" height="25" style="cursor:pointer" onClick="submit(this.form);">

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi hbogie.

This solution deals with this problem you're having:

Just to surmise:

Courtesy of zvonko

"onClick="javascript:document.forms[0].submit();return false"

Alternatively, to specify by form name:

Three syntax methods:

onClick="javascript:document.forms['yourFormName'].submit();return false"


onClick="javascript:document.forms.yourFormName.submit();return false"


onClick="javascript:document.yourFormName.submit();return false"

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hbogieAuthor Commented:
THANKS...have been looking all afternoon and got so many variations....your quick answer worked perfectly!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Browsers

From novice to tech pro — start learning today.