Hello Guys,
I am trying to submit a form but only when the variable bSrch is equal to 1, bascially the whole idea is the client has to click on the button before they can click the image (which submits the form) so what i do is when the form loads i make bSrch = 0 and when they click the search button i make bSrch = 1, and now when they goto click the image (which submits the form) i check to see if equals 1, simple enough right? Well everything works but it doesnt submit the form, I replaced the test.submit code with alert9('Hi') to see if it does get through and it does, but my form just wont submit! nothing happens, please shed some light on this situation for me please, Thanks....
Code:
<body onLoad = "bSrch=0;">
<form name="search">
<input type="text" name="srchtxt">
<input type="button" onClick= "bSrch = 1;window.test.imgr.src='../images/featured.gif'">
</form>
<form name="test" action="Clears.asp" method="post">
<input type="text" name="txtfld" value="Test Value">
<a href="javascript: void(0);" onClick="if (bSrch == 1) test.submit;"><img src="../images/crm.gif" name="imgr"></a>
</form> Gordon R. Durgha
gd@vslink.net
I am trying to submit a form but only when the variable bSrch is equal to 1, bascially the whole idea is the client has to click on the button before they can click the image (which submits the form) so what i do is when the form loads i make bSrch = 0 and when they click the search button i make bSrch = 1, and now when they goto click the image (which submits the form) i check to see if equals 1, simple enough right? Well everything works but it doesnt submit the form, I replaced the test.submit code with alert9('Hi') to see if it does get through and it does, but my form just wont submit! nothing happens, please shed some light on this situation for me please, Thanks....
Code:
<body onLoad = "bSrch=0;">
<form name="search">
<input type="text" name="srchtxt">
<input type="button" onClick= "bSrch = 1;window.test.imgr.src='../images/featured.gif'">
</form>
<form name="test" action="Clears.asp" method="post">
<input type="text" name="txtfld" value="Test Value">
<a href="javascript: void(0);" onClick="if (bSrch == 1) test.submit;"><img src="../images/crm.gif" name="imgr"></a>
</form> Gordon R. Durgha
gd@vslink.net