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

Q156 How can I submit a text field so that after pressing "return" or clicking button it would be possible to jump to another URL page, containing the description of that word entered in the text field?

You are here: irt.org | FAQ | JavaScript | Form | 10.3 | Q156 [ previous next ]

Try:

<SCRIPT LANGUAGE="JavaScript"><!--
function myFunction() {
    location.href = document.myForm.myText.value + '.html';
    return false;
}
//--></SCRIPT>

<FORM NAME="myForm" onSubmit="return myFunction()">
<INPUT NAME="myText" TYPE="TEXT">
<INPUT TYPE="BUTTON" VALUE="Click Me" onClick="myFunction()">
</FORM>

To avoid "404 - Page not found " error messages - combine the above with the technique discussed in the article Intelligent Password Verification #2.

©2018 Martin Webb