G
Garg
Hi,
I am facing a problem while trying to close a window that I've opened
in a frame.
I am using javascript to close my current popup window. I have written
the following line of code on click of OK button event.
Response.Write("<script> window.close();</script>")
Now the problem is since this window is closed, the frame is still
there and hence, on click of Ok button I get directed to the error
page. I am simply clueless where my control goes when I press OK
button. It just redirects me to the error page.
While debugging, I tried another thing. Right below the above
statement, I added another line of code, i.e.,
Response.Write("<script> window.close();</script>")
Response.Redirect("Home.aspx")
Now with this code in the OK button event handler, when I clicked on
OK button, my current aspx page clsoed and new page (i.e. Home.aspx)
appeared in the frame.
So, it means when I am just writing the first line of code
( Response.Write("<script> window.close();</script>")), at that time
error is, perhaps, because my frame is still open and has nothing to
display.... Dont know...
How do I overcome this problem?? Please help....
Thanks
Shivani
I am facing a problem while trying to close a window that I've opened
in a frame.
I am using javascript to close my current popup window. I have written
the following line of code on click of OK button event.
Response.Write("<script> window.close();</script>")
Now the problem is since this window is closed, the frame is still
there and hence, on click of Ok button I get directed to the error
page. I am simply clueless where my control goes when I press OK
button. It just redirects me to the error page.
While debugging, I tried another thing. Right below the above
statement, I added another line of code, i.e.,
Response.Write("<script> window.close();</script>")
Response.Redirect("Home.aspx")
Now with this code in the OK button event handler, when I clicked on
OK button, my current aspx page clsoed and new page (i.e. Home.aspx)
appeared in the frame.
So, it means when I am just writing the first line of code
( Response.Write("<script> window.close();</script>")), at that time
error is, perhaps, because my frame is still open and has nothing to
display.... Dont know...
How do I overcome this problem?? Please help....
Thanks
Shivani