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

Q9 How do I make a button that when clicked displays a message in a field?

irt.org | Knowledge Base | JavaScript | Form 10.1 | Q9 [ previous next ]

Q9 How do I make a button that when clicked displays a message in a field?

<form name="formName" onSubmit="return functionName();">
<input type=text name="textName">
<input type=submit value="Display">
</form>
<script language="JavaScript"><!--
function functionName() {
    window.document.formName.textName.value = 'hello world';
    return false;
}
//--></script>

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.