[code]<html> <head> <script> function didMyselfThings(){ alert('didMyselfThings'); } </script> </head> <body> <table width="100%"> <tr><td width="100%">showimage</td></tr> <tr> <td><img src="http://www.lbzone.com/image/2_159.jpg"/></td> </tr> <tr><td> <input type="button" disabled=disabled onclick="didMyselfThings();showIframe(this);" value="submit" id="butSub"/> <input type="button" onclick="showOpenner(openYourOpenner())" value="showOpenner" id="butShowOpen"/> <script> var openerRepeat; var opennerBut=document.getElementById("butShowOpen"); var openWinRef; function openYourOpenner(){ win=window.open("openner.html","_blank"); return win; } function disableBut(){ opennerBut.disabled=true; } function showOpenner(obj){ disableBut(); if(typeof(obj)=="undefined"){ return; }else{ openWinRef=obj; openerRepeat=setInterval(isOpenerComplete,200); } } function isOpenerComplete(){ if(getOpennerStatus(openWinRef)=="complete"){ opennerBut.disabled=false; clearInterval(openerRepeat); } } function getOpennerStatus(obj){ return obj.document.readyState; } </script> <script> var timeRepeat; var butObj=document.getElementById("butSub"); function showIframe(){ butObj.disabled=true; document.frames["innerFrame"].location.href="iframe.html"; timeRepeat=setInterval(isIframeComplete,200); } function getIframeStatus(){ return document.frames["innerFrame"].document.readyState; } function isIframeComplete(){ if(getIframeStatus()=="complete"){ butObj.disabled=false; clearInterval(timeRepeat); } } </script> <script> var butStatus; function isDocumentCompute(){ if(document.readyState=="complete") return true; else return false; } function enableButSub(){ if(isDocumentCompute()&&isIframeComplete()){ butObj.disabled=false; clearInterval(butStatus); } } function checkSubbut(){ butStatus=setInterval(enableButSub,200); } checkSubbut(); </script> </td></tr> <tr> <td> <iframe src="a.html" name="innerFrame" width="100%" height="2000"> </iframe> </td> </tr> </table> </body> </html>[/code]