I am trying to hide an iframe until its contents has loaded.
I'm doing the following...
and
Only the iframe is never displayed, i even added an alert in the show_doc code, so I have to conclued that an iframe onload event doesn't exist?
Am I doing something wrong? how else can i detect an iframe has loaded its contents?
NB. loading document is a PDF.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Google Rank Extractor -> Perl beta with FusionCharts
I'm doing the following...
Code:
<div id="grasp_doc" style="display:none;">
<iframe style="width:900px; height:500px; border:1px solid #233e97; margin-bottom:5px;" frameborder="0" src="<tmpl_var name='doc'>" onload="show_doc();"></iframe>
<form action = "<tmpl_var name='url_to_cgi'>/grasp_sys.pl" method="post" onsubmit="return check_read(this);">
<fieldset id="declare">
<legend>Declaration (tick box to agree)</legend>
<label for="declaration">I confirm I have fully read the above 'grasp' document.</label>
<input type="checkbox" name="declaration" id="declaration" value="1" />
</fieldset>
<input type="submit" name="submit" id="submit" value="Submit 'read' confirmation" />
</form>
</div>
<h2 id="grasp_msg">Please Wait… document is loading.</h2>
and
Code:
function show_doc (){
document.getElementById('grasp_doc').style.display='block';
document.getElementById('grasp_msg').style.display='none';
}
Only the iframe is never displayed, i even added an alert in the show_doc code, so I have to conclued that an iframe onload event doesn't exist?
Am I doing something wrong? how else can i detect an iframe has loaded its contents?
NB. loading document is a PDF.
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."
"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Google Rank Extractor -> Perl beta with FusionCharts