CrimsonDiva
Programmer
Hi There,
I have a complicated ASP/vbscript/javascript page with an IFRAME in it that doesn't seem to be submitting with the form. Here is a portion of the code:
<SCRIPT LANGUAGE="javascript">
function checkForm(){
var theform = document.frmsdnemail;
//Check for the e-mail body
if (theform.mailbody.value==""{
errorMsg += "\n\t* Please enter a Message for the e-mail";
} <=== GET A SCRIPT ERROR SAYING THAT theform.mailbody.value IS NULL OR NOT AN OBJECT
</SCRIPT>
<FORM NAME="frmsendmail" onSubmit="return checkForm();">
<TD VALIGN="top">
<%
'This bit creates a random number to add to the end of the iframe link as IE will cashe the page
'Randomise the system timer
Randomize Timer
%>
<SCRIPT language="javascript">
//Create an iframe and turn on the design mode for it
document.write ('<IFRAME SCROLLING="yes" SRC="adv_mail_textbox.asp?ID=<% = CInt(RND * 2000)%> id="mailbody" WIDTH="450" HEIGHT="200" NAME="mailbody"></iframe>')
frames.mailbody.document.designMode = "On";
</SCRIPT>
<INPUT TYPE="submit" NAME="Submit" VALUE="Send Myself a Preview" CLASS="btnSmall">
</FORM>
CAN SOMEONE TELL ME WHY THIS IS HAPPENING?
Thanks!
I have a complicated ASP/vbscript/javascript page with an IFRAME in it that doesn't seem to be submitting with the form. Here is a portion of the code:
<SCRIPT LANGUAGE="javascript">
function checkForm(){
var theform = document.frmsdnemail;
//Check for the e-mail body
if (theform.mailbody.value==""{
errorMsg += "\n\t* Please enter a Message for the e-mail";
} <=== GET A SCRIPT ERROR SAYING THAT theform.mailbody.value IS NULL OR NOT AN OBJECT
</SCRIPT>
<FORM NAME="frmsendmail" onSubmit="return checkForm();">
<TD VALIGN="top">
<%
'This bit creates a random number to add to the end of the iframe link as IE will cashe the page
'Randomise the system timer
Randomize Timer
%>
<SCRIPT language="javascript">
//Create an iframe and turn on the design mode for it
document.write ('<IFRAME SCROLLING="yes" SRC="adv_mail_textbox.asp?ID=<% = CInt(RND * 2000)%> id="mailbody" WIDTH="450" HEIGHT="200" NAME="mailbody"></iframe>')
frames.mailbody.document.designMode = "On";
</SCRIPT>
<INPUT TYPE="submit" NAME="Submit" VALUE="Send Myself a Preview" CLASS="btnSmall">
</FORM>
CAN SOMEONE TELL ME WHY THIS IS HAPPENING?
Thanks!