I am using a modal window and an iFrame to try and pull a return value
back. I am doing this across domains.
I have the value returned from the modal window to the iFrame window
but I can not get the value returned to the parent window. The alert
in the parent window always returns undefined errors. Any help would
be much appreciated.
I call the modal window and wait for the return as such:
function LCC()
{
var aUrl = "http://.../IFrame.html";
sFeatures="dial ogHeight:600px; dialogWidth:850 px;resizable:ye s;center:yes"
LCV = window.showModa lDialog(aUrl,"" ,sFeatures);
alert(LCV);
}
</script>
Here is the iFrame:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitl ed Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<script>
function onunloadevent() {
parent.window.r eturnValue = window.frames[0].aValue.innerTe xt;
alert(window.re turnValue);
}
</script>
<body onunload='onunl oadevent();'>
<TABLE align='left' border='0'>
<TR>
<TD align='center'> <IFRAME frameborder='0' id="Frame1"
src="http://...../default.asp" Style="HEIGHT: 10in; WIDTH: 10in;
MARGIN=0" SCROLLING="no" ></IFRAME></TD>
</TR>
</table>
</body>
</html>