Forum Moderators: open
Thanks,
Kevin
You can enhance the timeout trick to make sure the menus really are loaded.
Declare a variable outside all functions (so it is global):
var menuLoaded = false;
Then right at the end of the functions that load the menus, set it to true:
menuLoaded = true;
Now make new a function that gets called by the body onLoad event:
function waitUntilReady() {
if (menuLoaded) {
doPopup() // the menus are ready so call the popup function
} else {
setTimeout("waitUntilReady()",100) // try again in 0.1 seconds
}
midwestclinic.org/conferenceinfo2.asp
I have a call and the end of the menuloader to another js page which contains the following code:
openPopWin("http://www.midwestclinic.org/perf_popup.html", 400, 200, "", 20,
200)
<!--
// Copyright 1999 - 2002 by Ray Stott, Pop-up Windows Script ver 2.0 // OK to use if this copyright is included // Script is available at [crays.com...]
var popWin = null // use this when referring to pop-up window
var winCount = 0
var winName = "popWin"
function openPopWin(winURL, winWidth, winHeight, winFeatures, winLeft, winTop){
var d_winLeft = 350 // default, pixels from screen left to window left
var d_winTop = 150 // default, pixels from screen top to window top
winName = "popWin" + winCount++ //unique name for each pop-up window
closePopWin() // close any previously opened pop-up window
if (openPopWin.arguments.length >= 4) // any additional features?
winFeatures = "," + winFeatures
else
winFeatures = ""
if (openPopWin.arguments.length == 6) // location specified
winFeatures += getLocation(winWidth, winHeight, winLeft, winTop)
else
winFeatures += getLocation(winWidth, winHeight, d_winLeft, d_winTop)
popWin = window.open(winURL, winName, "width=" + winWidth
+ ",height=" + winHeight + winFeatures)
}
Any way to keep the popup window displayed over the main page and not minimized to the toolbar?
Thanks,
Kevin