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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enter Key in netscape does not submit form

Status
Not open for further replies.

ChrisQuick

Programmer
Oct 4, 1999
144
US
I have two forms laid out as follows:

<FORM NAME='searchbyowner' Method='GET' ACTION='somepage.asp'>
<B>Owner:</B>
<INPUT TYPE='text' NAME='Owner' VALUE='' MAXLENGTH=30 SIZE=30>
<INPUT TYPE='HIDDEN' NAME='CMD' VALUE='FINDOWNER'>
<INPUT TYPE='submit' VALUE='FindOwner'>
</FORM>

<FORM NAME='searchbyadd' Method='GET' ACTION='somepage.asp'&quot;>
<INPUT TYPE='hidden' name='cmd' VALUE='FindAddress'>
<b>Address Number</b>
<INPUT TYPE='text' name='num' value='' MAXLENGTH='5' SIZE=5>
<b>Street:</B>
<INPUT TYPE='text' NAME='street' VALUE='' MAXLENGTH=30 SIZE=30,1>
<INPUT TYPE='submit' VALUE='FindAddress'>
</FORM>

In Internet Explorer, if you fill in an input for a form and hit enter, the form associated with that input is submitted. In Netscape, I have to actually click the submit button to submit the form. Is this normal in Netscape?

Thanks chrisquick@aol.com
Geographic Information System (GIS), ASP, some Oracle
 
... if something can be called &quot;normal&quot; in nn<6 ... ;-)
 
you can make it so the enter key will submit the form, though:

<script>
function handleKey(e)
{
if(e.which==13)
{
document.fut.submit();
}
}
</script>
</head>

<body>
<form name=&quot;fut&quot; method=&quot;GET&quot; action=&quot;somewhere.asp&quot;>
<input type=&quot;text&quot; name=&quot;jive&quot; onkeypress=&quot;handleKey(event)&quot;>
<input type=&quot;submit&quot;>
</form>

this will only work in Netscape (and probaly not in ver 6). jared@aauser.com
 
> this will only work in Netscape (and probaly not in ver 6).

Yeah, another version of the Nasty browser to have to develop to. No problem really I just add another case to my switch statement. What's one more when there are already 273 versions of the Nasty browser. ;-)

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top