...

View Full Version : (javascript) Keep checking for a element before proceeding.



msimmons
07-25-2002, 04:50 PM
from a hidden frame I am loading a page that has quite a few input boxes and directly after that I am location.href'ing a page into that hidden frame that will outerHTML some values to some of the inputs just added. Theoreticly it works ;) The problem I am having is that my computer or internet connection is too fast and the inputs are not there in time. I wrote a function that I thought would work but it didn't.


function loadPropertyInfoPage(){
if (!parent.frames[2].document.all.HotelID){
parent.frames[2].location.href = "propertyinfo.asp";
setTimeout("loadPropertyInfoPage()",1000);
}
}
//-->
</SCRIPT>
</head>
<body>
<script>
loadPropertyInfoPage();
.then do outerHTMLs
</script>

any suggestions?
Thanks
Michael

msimmons
07-25-2002, 05:09 PM
It seems to be working but if anyone has a better way I'm all ears :)
Michael

joh6nn
07-26-2002, 02:36 AM
use the onload event of the hidden frame, to execute the function? just a thought.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum