Click to See Complete Forum and Search --> : Popup from within popup?
n@@by
10-20-2003, 10:27 AM
I have a popup window with a form in it. And there's a button on it that should pop up another window. But what happens is no matter what I do the new page appears in the already open popup.
Another problem (but I'm not that far yet), is that the first popup will need to be refreshed after the second popup form is submitted.
Please help out a noob ;)
AdamGundry
10-20-2003, 10:33 AM
You shouldn't be using popups at all, especially multiple popups, to comply with accessibility standards/legislation.
However, there is no reason for a normal popup not to work from within another. You may be using the same window name for both, perhaps?
Adam
n@@by
10-20-2003, 10:39 AM
I know I shouldn't be using popups.... but this is not a regular website you see. Its an aplication for data processing. We chose to develop it online, so its accesible everywhere. It must show the data all the time, so popups are inevitable.
And no.... its not using the same name.
First script to open the first popup:
function openWindow(url,winWidth,winHeight) {
if (typeof popupWin != "undefined") {
popupWin.close();
}
popupWin = window.open(url+"?ID="+ID,'new_page','width=' + winWidth + ',height=' + winHeight + ',scrollbars=yes, alwaysRaised=yes,top=100,left=100')
popupWin.focus();
}
and in the page that is loaded in the popup there's this:
function openSecondWindow(url,winWidth,winHeight) {
if (typeof popupWin2 != "undefined") {
popupWin2.close();
}
popupWin2 = window.open(url+"?ID="+ID,'new_page','width=' + winWidth + ',height=' + winHeight + ',scrollbars=yes, alwaysRaised=yes,top=100,left=100')
popupWin2.focus();
}
AdamGundry
10-20-2003, 10:42 AM
Both functions use the name 'new_page' (the second parameter of window.open) - try changing the second one to something else.
Adam
n@@by
10-20-2003, 10:45 AM
ah crap... how could I miss that... LOL
thanks!