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

Feedback on: irt.org FAQ Knowledge Base Q23, June 22, 2000 at 08:54:02:

You are here: irt.org | About | Feedback | 1415 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base Q23

Sent by
Roger Rudder on June 22, 2000 at 08:54:02:

Worth:
Very worth reading

Length:
Just right

Technical:
Just right

Comments:
This is code from one
of your pages. It works fine in
Internet Explorer but how would
you get it to work in netscape?

raj.

In this example there are two forms within the same document called formName1 and formName2. Within formName1 there is a drop down select list called selectName1 and within formName2 there are two text box fields called textboxName1 and textboxName2

There are various events we could utilise to pass the value or text from the selected option to the text box, e.g. onClick, onChange, onFocus, onBlur and onClick.

In this example I shall use the onChange event to trigger the setForm2Value() function which will change the value of the two text boxes to the value and text of the selected option:

<SCRIPT LANGUAGE="JavaScript"></SCRIPT>

<FORM NAME="formName1">
<SELECT NAME="selectName1" onChange="setForm2Value()">
<OPTION>Select one:
<OPTION VALUE="ill">Doc
<OPTION VALUE="miserable">Happy
<OPTION VALUE="cheerful">Grumpy
<OPTION VALUE="wide awake">Sleepy
<OPTION VALUE="smart">Dopey
<OPTION VALUE="boastful">Bashful
<OPTION VALUE="breathing">Sneezy
</SELECT>
</FORM>

<P>

<FORM NAME="formName2">
<INPUT TYPE="TEXTBOX" NAME="textboxName1" VALUE="" SIZE=10>
is
<INPUT TYPE="TEXTBOX" NAME="textboxName2" VALUE="" SIZE=10>
</FORM>





Other feedback on 'irt.org FAQ Knowledge Base Q23' - show all

©2018 Martin Webb