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

Q673 How can I set the default value of a text box when a certain condition is true?

You are here: irt.org | FAQ | JavaScript | Form | 3.3 | Q673 [ previous next ]

Only by creating the form field using JavaScript:

<FORM>

<SCRIPT LANGUAGE="JavaScript"><!--
document.write('<INPUT TYPE="TEXT"');
if (true)
    document.write(' VALUE="default"');
document.write('>');
//--></SCRIPT>

</FORM>

©2018 Martin Webb