Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Form 3.3 | Q673 [ previous next ]

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

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>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.