in reply to Re^4: send windowmessage from cgi back to form that called the cgi
in thread send windowmessage from cgi back to form that called the cgi
I still think you do want to do things onload to get your alert box, but i did go to your page and now understand better what you want.
ok for starters add this above "function onMessage(event)"
then underfunction showTable(loc) { document.getElementById("tableId").innerHTML="Waiting on:" + loc; document.getElementById("dataDialog").src = loc; }
add<iframe id="dataDialog" name="dataDialog" style="float:right"; src=""; + border:1px solid black;" scrolling="no" allowtransparency="true" all +owfullscreen="false" frameborder="no" width="200" height="400" > </iframe>
now change<div id="tableId" style="background-color:lightgray"></div>
to<input type="button" class="jalaLtSans" value="Member Table Data Updat +e" style="background-color:#0D4A80; width : 250px; color:#fff" onClic +k = "self.location='https://www.jala-mi.org/httpsdocs/cgi-bin/update_ +tables-development.cgi?action=updatetable_3'"/>
.location and .src may do the same, my code uses .src<input type="button" class="jalaLtSans" value="Member Table Data Updat +e" style="background-color:#0D4A80; width : 250px; color:#fff" onClic +k = "showTable('https://www.jala-mi.org/httpsdocs/cgi-bin/update_tabl +es-development.cgi?action=updatetable_3')"/>
now if you still want the "Get File Load Status" button change its code to
How is that? aww but you want to get rid of the "waiting on" junk now dont ya? Well that is part of the side effect of my iframeLoad call from the cgi. so change your cgi-bins that use this technique to look something like<input type="button" class="jalaLtSans" value="Get File Load Status" s +tyle="background-color:#0D4A80; width : 250px; color:#fff" onClick = +"showTable('https://www.jala-mi.org/httpsdocs/cgi-bin/update_tables-d +evelopment.cgi?action=updatereport')"/>
print $q->header( -type =>'text/html'); print <<"EODEOD"; <title>mytitle</title> <script language="JavaScript"> <!-- function iframeLoad(a) { a = document.getElementById("tableId").innerHTML; parent.document.getElementById("tableId").innerHTML = a; parent.document.getElementById("dataDialog").src = "about:blank"; }//--> </script> <body onload="iframeLoad()"> <div id="tableId"> EODEOD ...... print '</div>';
After running this a bit you may understand why my code has style="visibility:hidden;display:none" for hiframe
now as an exercise for the reader, imagine that showTable instead looked like this
and the onClicks were suitably modified to contain the proper ids, say table1,table2,table3 and these were spread out in your codefunction showTable(loc,table) { document.getElementById(table).innerHTML="Waiting on:" + loc; document.getElementById("dataDialog").src = loc; }
and each different cgi-bin program used its own tableid instead of the generic TableId i showed. cute huh? I just showed you stuff from the simpler page so you wouldnt get too confused. One side effect i havent corrected for is that only one "button" can be in progress at a time, i never put a locking protocol in place, i just dont press another button till the last has finished<div id="tableid1" style="background-color:lightgray"></div> <div id="tableid2" style="background-color:lightgray"></div> <div id="tableid3" style="background-color:lightgray"></div>
And yet i still tend to deny knowing any javascript,and Noscript blocks most pages i visit. I also deny knowing any cobol, c, or assembler too cuz last time i admitted to knowing cobol they made me program in it. and made me read other peoples dumps, Dont know TPF either
BTW: Doesnt routine that send back html to the iframe? should have been "Doesnt the routine send back html to the iframe?" Aparently not, it just replaced the main page it seems.
and Gad it takes me time to work out the bugs in this stuff.
"what do you mean ME kemosabe"
https://www.youtube.com/watch?v=oWuMevc6G4w
edit: i like this one better https://www.youtube.com/watch?v=e1TmhBJxO70
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: send windowmessage from cgi back to form that called the cgi
by tultalk (Monk) on Mar 15, 2017 at 12:51 UTC | |
by huck (Prior) on Mar 15, 2017 at 19:23 UTC | |
by tultalk (Monk) on Mar 16, 2017 at 03:39 UTC | |
by Anonymous Monk on Mar 15, 2017 at 19:46 UTC | |
by huck (Prior) on Mar 15, 2017 at 19:51 UTC | |
|