Hi Guys
Another beginner questions (sorry!). I have the following pages setup:
Page1.asp (parent window)
Page2.asp (parent window)
PopupPage.asp (child window)
Page1.asp has a form which when submit will open a new window displaying PopupPage.asp.
On the PopupPage.asp, depending on the values selected from the form, a table is shown with rows of data returned from SQL query. Now one column of each row contains a hyperlink. And upon clicking the hyperlink will force the parent window to load Page2.asp. PopupPage.asp (child window) still open and will be until it is closed).
The problem I am having is that on Page2.asp, there is a Back button which when click takes user back to Page1.asp. I want to close the PopupPage.asp ie the Child window when this Back button is clicked. However, when I do the following in Page2.asp:
if (formWin && !formWin.closed) {
formWin.close();
}
It wont work. "formWin" is the name i give to the child window.
Is this because the handler for the child window is lost once I load a new page ie Page2.asp in the parent window? So does this mean I need to pass the handler from page1.asp to page2.asp?
Any solutions are highly appreciated!! Again i am a beginner so please go easy on me.
Thanks for your help
Regards
Kevin
Another beginner questions (sorry!). I have the following pages setup:
Page1.asp (parent window)
Page2.asp (parent window)
PopupPage.asp (child window)
Page1.asp has a form which when submit will open a new window displaying PopupPage.asp.
On the PopupPage.asp, depending on the values selected from the form, a table is shown with rows of data returned from SQL query. Now one column of each row contains a hyperlink. And upon clicking the hyperlink will force the parent window to load Page2.asp. PopupPage.asp (child window) still open and will be until it is closed).
The problem I am having is that on Page2.asp, there is a Back button which when click takes user back to Page1.asp. I want to close the PopupPage.asp ie the Child window when this Back button is clicked. However, when I do the following in Page2.asp:
if (formWin && !formWin.closed) {
formWin.close();
}
It wont work. "formWin" is the name i give to the child window.
Is this because the handler for the child window is lost once I load a new page ie Page2.asp in the parent window? So does this mean I need to pass the handler from page1.asp to page2.asp?
Any solutions are highly appreciated!! Again i am a beginner so please go easy on me.
Thanks for your help
Regards
Kevin