I need to use javascript which stores the current values of textboxes when a button is clicked.
this is the code
--------------------------------------------------------------------------------------------------------------------
<FORM NAME="myform" ACTION="" METHOD="GET">Enter something in the box: <BR>
<textarea TYPE="text" NAME="inputbox" VALUE=""></textarea><P>
<INPUT TYPE="button" NAME="button" Value="Click" onClick="testResults(this.form)">
</FORM>
<SCRIPT LANGUAGE="JavaScript">
function testResults (form) {
var TestVar = form.inputbox.value;
alert ("You typed: " + TestVar);
}
</SCRIPT>
-------------------------------------------------------------------------------------------------------------------
when i use CKEDITOR on the textbox/textarea it does not work.
my guess is that CKEDITOR replaces form.inputbox with something else
how would i go about getting this code to work while CKEDITOR is in use
this is the code
--------------------------------------------------------------------------------------------------------------------
<FORM NAME="myform" ACTION="" METHOD="GET">Enter something in the box: <BR>
<textarea TYPE="text" NAME="inputbox" VALUE=""></textarea><P>
<INPUT TYPE="button" NAME="button" Value="Click" onClick="testResults(this.form)">
</FORM>
<SCRIPT LANGUAGE="JavaScript">
function testResults (form) {
var TestVar = form.inputbox.value;
alert ("You typed: " + TestVar);
}
</SCRIPT>
-------------------------------------------------------------------------------------------------------------------
when i use CKEDITOR on the textbox/textarea it does not work.
my guess is that CKEDITOR replaces form.inputbox with something else
how would i go about getting this code to work while CKEDITOR is in use