You are here: irt.org | FAQ | JavaScript | Form | Q1358 [ previous next ]
In Internet Explorer try:
<form> <textarea name="text1"> </textarea> <input type="radio" name="rbt_IsMessagePreformatted_b" value="1" onclick="this.form.text1.wrap = 'hard'> yes <input type="radio" name="rbt_IsMessagePreformatted_b" value="0 checked onclick="this.form.text1.wrap = 'virtual'> no </form>
or:
<script language="JavaScript"><!-- function changewrap(theRadio){ if (theRadio.value == "yes") document.form1.text1.wrap = "hard"; else document.form1.text1.wrap = "virtual"; } //--></script> <form name="form1"> <textarea name="text1"> </textarea> <input type="radio" name="format" value="1" onclick="changewrap(this)"> yes <input type="radio" name="format" value="0 checked onclick="changewrap(this)"> no </form>
or:
<script language="JavaScript"><!-- function changewrap(theWrap){ document.form1.text1.wrap = theWrap; } //--></script> <form name="form1"> <textarea name="text1"> </textarea> <input type="radio" name="format" value="1" onclick="changewrap('hard')"> yes <input type="radio" name="format" value="0 checked onclick="changewrap('virtual')"> no