
April 9th, 2001, 05:22 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
<i><b>Originally posted by : Mage (mage@baltnet.ru)</b></i><br />Hi!<br /><br />I think she might have seen such page! Try to look at my code below. You're jumping to the next field by pressing Enter key.<br /><br />-----------* Code *-----------------<br /><html><br /><head><br /><script language="JavaScript"><br /><!--<br /><br />currentStep=1;<br /><br />function doSbm()<br />{<br /> document.form1.submit;<br />}<br /><br />function nextStep()<br />{<br /> currentStep = currentStep + 1;<br /> if (currentStep > 4) currentStep = 1;<br /> switch(currentStep){<br /> case 1:<br /> document.form1.name1.focus();<br /> break;<br /> case 2:<br /> document.form1.name2.focus();<br /> break;<br /> case 3:<br /> document.form1.name3.focus();<br /> break;<br /> case 4:<br /> document.form1.name4.focus();<br /> break;<br /> default:<br /> document.form1.name1.focus();<br /> }<br /> return false;<br />}<br />//--><br /></script><br /><br /></head><br /><body><br /><FORM name="form1" method="post" action="your URL" onsubmit="return nextStep()"><br /><input name="name1"><br><br /><input name="name2"><br><br /><input name="name3"><br><br /><input name="name4"><br><br /><input type="submit" value="Next field"><br><br /><input type="button" value="Press here to submit the form" onclick="doSbm()"><br /></FORM> <br /></body><br /></html><br />-----------* End of Code *-----------------<br /><br />Best regards,<br /><br />Mage<br /><br /><br /><br /><br />------------<br />Mickey at 4/6/2001 9:17:05 AM<br /><br />I have a user that is asking that she be able to use the enter key to advance from field to field on a form. She says that she has been on a site that has this functionality. I personally think that this is an old user who has no idea what she is talking about. Is she lying to me or have any of you seen anything like this?
|