ibjdt
Programmer
- Nov 25, 2002
- 63
i have the form and ajax below. i want the form to use the ajax script to call a perl cgi script to display results to the screen in a div tag. i have it working on other pages, but here when the ajax script finishes, the page refreshes??
thanks.
Code:
<script type="text/javascript">
function ajaxcombo(loadarea){
var lkey = document.lform.keyword.value;
if (lkey == "")
{
alert ("\n\nEnter Search Term.\n\n");
return false;
}
var href=myUrl/lookup.cgi?keyword='+lkey;
ajaxpage(href, loadarea);
}
</script>
<form name=lform id=lform onsubmit="keyword.value=keyword.value.toUpperCase(); ajaxcombo('pns');" action="">
<input type=text name=keyword class=input><br>
<input type=submit value=submit class=input>
<div id=pns></div>
</form>
thanks.