This is more java JavaScript related than perl, but i have a page where i want to execute java JavaScript when it loads. based on what it does so you could try
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
In the parent i hadfunction iframeLoad(a) { a = document.getElementById("tableId").innerHTML; parent.document.getElementById("tableId").innerHTML = a; parent.document.getElementById("hiframe").src = "about:blank"; }
and the cgi call also returned... 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> ....
.... <div id="tableId"> <pre> some stuff to display more stuff </pre></div>
In reply to Re^3: send windowmessage from cgi back to form that called the cgi
by huck
in thread send windowmessage from cgi back to form that called the cgi
by tultalk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |