print $q->header( -type =>'text/html');
print <<"EODEOD";
<title>mytitle</title>
<script language="JavaScript">
<!--
function iframeLoad(a) {
window.parent.postMessage({
'func': 'GetFileLoadStatus',
'message': 'Message text from iframe.'
}, "*");
}
//-->
</script>
<body onload="iframeLoad()">
EODEOD
Edit: a was just a temp var, my sub was
function iframeLoad(a) {
a = document.getElementById("tableId").innerHTML;
parent.document.getElementById("tableId").innerHTML = a;
parent.document.getElementById("hiframe").src = "about:blank";
}
In the parent i had
...
function showTable(loc) {
document.getElementById("tableId").innerHTML="Waiting on:" + loc;
document.getElementById("hiframe").src = loc;
}
...
<input type="button" value="run program" onclick="showTable('/cgi-bin/
+program.pl?parm1=1')">
<iframe id="hiframe" src="about:blank" style="visibility:hidden;displa
+y:none"></iframe>
<div id="tableId" style="background-color:lightgray"></div>
....
and the cgi call also returned
....
<div id="tableId">
<pre>
some stuff to display
more stuff
</pre></div>
|