Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback: irt.org FAQ Knowledge Base Q471

Feedback on: irt.org FAQ Knowledge Base Q471

Sent by Tom on February 22, 2000 at 19:11:23: - feedback #841

Worth:
Worth reading

Length:
Too short

Technical:
Not technical enough

Comments:

Any suggestions on what to do when the field hasn't changed?


Sent by Richard Day on September 07, 2000 at 08:47:27: - feedback #1722

Comments:
Your first statement appears not to be true! After changing a value and pressing enter the onChange event is not fired. At least not on my browser (IE5)


Sent by Rob Mainwaring on March 19, 2001 at 22:26:32: - feedback #2509

Length:
Too short

Technical:
Not technical enough

Comments:
The answer to the following ...

Q471 How can I simulate the tab key when the enter key is pressed?

... does not work.

Using onChange, and/or onBlur does not work in MSIE 5.~ These events do not trigger from the Enter key. I got as far as trapping the last key pressed and hope to compare it with the ASCII value of the Enter key (and or Return key). Of course if anyone has already donethis or there is a better solution, please don't hesitate to let me know.




Sent by Dave Hewitt on November 06, 2001 at 09:26:36: - feedback #3303

Worth:
Worth reading

Length:
Too short

Technical:
Not technical enough

Comments:
The example does not work. I do have an alternative solution using the onsubmit event, which will tab through all fields until the visible submit button is reached and then submits the form from that button. The actual submit button is styled to have dimensions of 1x1, at least partially hiding it from the user. Not the most elegant answer, but it works :) :

<html>
<head>
<script>
var focusControl;

function doFocusChange() {
focusControl.focus();
return false;
}

function nextFocus(control) {
focusControl = control;
}


</script>
</head>
<body>

<form name="myForm" method="post" action="testForm.html" onSubmit="return doFocusChange()">
<input type="text" name="text1" onFocus="nextFocus(document.myForm.text2)">
<input type="text" name="text2" onFocus="nextFocus(document.myForm.text3)">
<input type="text" name="text3" onFocus="nextFocus(document.myForm.Submit)">
<input type="submit" width="1" style="width: 1; height: 1;">
<input type="button" name="Submit" value="Submit" onClick="submit()">

</form>


</body>



©2018 Martin Webb