PDA

View Full Version : kind of alert box help me


kamarthi7
01-08-2003, 08:52 AM
hello,

I am using an ASP page which has a botton, when it is clicked a new ASP page is opened. When a new page is opened the old page should not get accessed until the new page is dismissed. It is something like alert box or confirm box.

What would be the code to make it like above. please help.

Thank you
Anil

glenngv
01-08-2003, 09:27 AM
if the popup is opened in the parent like this:

var win;
function openPopUp(){
win = window.open("popup.asp","popup","width=300,height=200");
win.focus();
}

then you can add this code in the parent:

function checkPopup(){
if (win && !win.closed) win.focus();
}

and call it like this:

<body onfocus="checkPopup()" ...>

bfsog
01-08-2003, 09:27 AM
sorry what do you mean 'should not get accesed?' and dismissed? you mean closed? also, help me in the subject line is not good, were gonna help anyway!