I have two identical pages on two different servers (one is a test server, one is production).
They both use the same script to submit a form within an iframe while also closing a pseudo-modal box.
Here are the two example links:
[url]http://library.umhb.edu/website/redesign/working/borrow.html
[url]http://umhblib.umhb.edu/screens/borrow.html
Scroll down to the bottom of either page, and click “Email Cheri Howell” (don’t worry, the actual email is not being sent at this time). A screen will pop up with a form to be filled out by our patron, as well as a submit button. The submit button is actually on the parent document, while the form above it is in an iframe. On one server, when you click it, the form submits and the box closes. On the other server – however – the form never submits, but the box still closes.
The javascript in questions:
[CODE]function subThenClose(frameType)
{
if(frameType==”email”)
{
setTimeout(‘sClose();’,2000);
window.frames[‘sFrame’].document.forms[‘mainform’].submit();
}
}
The accompanying HTML:
[CODE]
<div id=”screen” class=”nodisplay”>
<div id=”noshow” onclick=”sClose();”></div>
<div id=”sBody” class=”sBody”>
<p>
<a href=”javascript:sClose();” class=”sLink”>CLOSE</a>
</p>
<iframe frameborder=”0″ scrolling=”no” name=”sFrame” id=”sFrame”></iframe>
<input type=”button” onclick=”subThenClose(’email’);” name=”Submit” value=”Submit”>
</div>
Please help me figure out why it works on one server and not on another!
Thanks