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

Q1358 How can I alter the wrapping of a text area from hard to virtual using radio buttons?

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

Q1358 How can I alter the wrapping of a text area from hard to virtual using radio buttons?

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

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.