Forum Moderators: open
Here's the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<html>
<head>
<title>Still River Web Solutions</title>
<script language="javascript">
function loadIframe(data) {
var url = 'http://www.stillriverweb.com/test/write.php?data=' + data;
window.frames['ifrm'].location = url;
//alert('test');
return true;
}
</script>
</head>
<body>
<form onsubmit="return loadIframe('test');">
<input type="submit" value="Submit">
</form>
<iframe id="ifrm" name="ifrm" scrolling="no" width="0" height="0" frameborder="0"></iframe>
</body>
</html>
I've tried everything I can think of. Any ideas would be appreciated.
window.frames['ifrm'].location = url;
is an asynchronous call. That is, your script will not stop executing here... it will continue on, even if the document has not finished loading in 'ifrm'.
function loadIframe(data) {
write = new Image();
url = 'http://www.jhnsyn.com/referraltracking/contact.php?data=' + data;
write.src = url;
while (!write.complete) {}
return true;
}