Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

works in firefox not in i explorer, href form submit

Status
Not open for further replies.

dessie1981

Programmer
Joined
May 9, 2006
Messages
116
Location
GB
Hi everyone,

Have a problem with my href form submit, it works in Firefox but not in microsoft ie5.

Below are segments of my code.

<script type="text/javascript">
<!--
function formSubmit()
{
document.myform.submit();
}
//-->
</script>

<p>
<form name="myform" method="post" action="confirmation.php?id=<?echo $p;?>">
<b>Purchase Order Number :
<input type="text" name="purchaseid"></form>
</p>

<a href = "quotation.php">Add as Quotation</a> / <a href="#" onClick="formSubmit();">Confirm order</a></p>

Any help would be great.
 
Maybe
`
Code:
document.forms["myform"]

would do the job.

Cheers,
Dian
 
It works as is in IE6.
Perhaps your browser has cached an older version of the page? Click on View\Source to ensure you are seeing the current code.



Google, you're my hero!
 
Thanks Guys for you feedback,

I added in "return false" and it did the trick.

Thanks again
Des
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top