Blur TextArea and Remove Chars

[Total: 0    Average: 0/5]

When the text area is blurred it will remove any newlines and double quotes.

Head Code:

function jsx1()
  var _f=document.my_form;
  var _o=_f.PASSCard_Message;
  var _r1= new RegExp("[nr]","g");
  _o.value=_o.value.replace(_r1,"  ");
  var _r2= new RegExp(""","g");

Body Code:

<form name=my_form>
<td width="162" valign="top" height="62">This will remove &quot; and newlines when the user blurs the textarea [clicks away from it]
<td width="559" colspan="2" height="62">
<textarea onblur="jsx1()" rows="2" name="PASSCard_Message" cols="60"></textarea></td>

Times Viewed: 10

Leave a Reply

Your email address will not be published. Required fields are marked *