anikar
06-01-2009, 06:57 PM
I have not been codeing for too long. The form submits correctly when the button is pressed bu wheni click enter on keyboard it gives a page not foud error
here is the code
function ByPartNo(){
var strTest = document.form1.search_criteria.value;
if (strTest){
document.form1.action="result_details_by_part_no.asp?mSKU="+ strTest
document.form1.submit();
}else{
alert("Please Enter a Valid ID.")
}
}
<form id="form1" name="form1" method="post">
<input name="search_criteria" type="text" id="search_criteria" size="25" /></td>
<td width="42%" style="border-style: none; border-width: medium"> <a href="javascript:ByPartNo()"><img src="images/search_button.gif" width="105" height="26" border="0" /></a></td>
</form>
Any help would be appreciated. Thanks in advance
here is the code
function ByPartNo(){
var strTest = document.form1.search_criteria.value;
if (strTest){
document.form1.action="result_details_by_part_no.asp?mSKU="+ strTest
document.form1.submit();
}else{
alert("Please Enter a Valid ID.")
}
}
<form id="form1" name="form1" method="post">
<input name="search_criteria" type="text" id="search_criteria" size="25" /></td>
<td width="42%" style="border-style: none; border-width: medium"> <a href="javascript:ByPartNo()"><img src="images/search_button.gif" width="105" height="26" border="0" /></a></td>
</form>
Any help would be appreciated. Thanks in advance