A
Apaxe2000
Hi.
I have this function:
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
function validate(frm) {
if (frm.p_40.value.length == 0) {
alert("The field is mandatory!");
frm.p_40.focus();
return false;
}
}
</SCRIPT>
This function is called in a onsubmit in the follow Form:
<form method="post" action="iwdw_forms_control.trata_forms" name="F201"
target="" onsubmit="return validate(F201)">
<TABLE width="100%" border="0" ID="Desenha_forms"><tbody>
<tr><td class="colorgrey"><label><div align="right"><strong>Despacho*
</strong></div></label></td><td><textarea name="p_40" cols="50"
rows="4"></textarea></td></tr>
<tr><td><input type="submit"
value="OK"></td></tr></tbody></table></form>
The textarea called "Despacho" is a textarea tinyMCE.
<script language="javascript" type="text/javascript"
src="/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
// Notice: The simple theme does not use all options some of them are
limited to the advanced theme
tinyMCE.init({
mode : "textareas",
theme : "simple"
});
</script>
My problem:
When i put a character (for example, "A") in the textarea and press
the button OK, the value in the iframe of the textarea is nul and the
mandatory message is show. Only after the onsubmit the iframe passed
the value "A" to the textarea.
If i back with the browser and clean the character "A". When i press
the button OK, the value in textarea continues "A" because de iframe
not updates the textarea, the mandatory message is not show.
Who can i validate if the iframe have ou not value when press de
button OK? Or, who can i update the value of the textarea with the
value of the iframe before the onsubmit.
Thanks for you help.
I have this function:
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
function validate(frm) {
if (frm.p_40.value.length == 0) {
alert("The field is mandatory!");
frm.p_40.focus();
return false;
}
}
</SCRIPT>
This function is called in a onsubmit in the follow Form:
<form method="post" action="iwdw_forms_control.trata_forms" name="F201"
target="" onsubmit="return validate(F201)">
<TABLE width="100%" border="0" ID="Desenha_forms"><tbody>
<tr><td class="colorgrey"><label><div align="right"><strong>Despacho*
</strong></div></label></td><td><textarea name="p_40" cols="50"
rows="4"></textarea></td></tr>
<tr><td><input type="submit"
value="OK"></td></tr></tbody></table></form>
The textarea called "Despacho" is a textarea tinyMCE.
<script language="javascript" type="text/javascript"
src="/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
// Notice: The simple theme does not use all options some of them are
limited to the advanced theme
tinyMCE.init({
mode : "textareas",
theme : "simple"
});
</script>
My problem:
When i put a character (for example, "A") in the textarea and press
the button OK, the value in the iframe of the textarea is nul and the
mandatory message is show. Only after the onsubmit the iframe passed
the value "A" to the textarea.
If i back with the browser and clean the character "A". When i press
the button OK, the value in textarea continues "A" because de iframe
not updates the textarea, the mandatory message is not show.
Who can i validate if the iframe have ou not value when press de
button OK? Or, who can i update the value of the textarea with the
value of the iframe before the onsubmit.
Thanks for you help.