I have the following script:
function LoadMainAndMessage(MainURL, MyMessage) {
if (MainURL) {
parent.frames['main'].location=MainURL;
}
if (MyMessage) {
alert(MyMessage);
}
}
which is triggered with a body onload command. Whenever I pass it something, it always does the ALERT first! How can I get it to display the alert AFTER the page has loaded (or at lease started loading?)
ie: I send LoadMainAndMessage("http://www.yahoo.com","Page Loading") and I'd like it to :
1) Load page http://www.yahoo.com in the "Main" frame, THEN
2) Display "Page Loading" as an alert (once the page HAS started loading!)
3) Require the user to click OK or CLOSE on the alert box
Instead, what it does now is:
1) Display "Page Loading"
2) Wait for the user to click OK or CLOSE on the alert box
THEN
3) Starts loading http://www.yahoo.com into the MAIN frame.
HELP! PLEASE! and Thanks!
2007-06-04
22:21:42
·
3 answers
·
asked by
Mike Z
5
in
Computers & Internet
➔ Programming & Design