The code below from the Bestbuy website is somewhat confusing to me.
In pseudo code it is saying "if newWindow exists and newWindow is not closed, then focus on newWindow, then assign a url to newWindow"
Well, if newWindow exists then why test to see if it is closed?
---- Code -------------
function popUp(url,name) {
if (newWindow) {
if (newWindow.closed == false) {
newWindow.focus();
}
}
newWindow = window.open(url,name,'toolbar=0,width=580,height=480');
}
In pseudo code it is saying "if newWindow exists and newWindow is not closed, then focus on newWindow, then assign a url to newWindow"
Well, if newWindow exists then why test to see if it is closed?
---- Code -------------
function popUp(url,name) {
if (newWindow) {
if (newWindow.closed == false) {
newWindow.focus();
}
}
newWindow = window.open(url,name,'toolbar=0,width=580,height=480');
}