Click to See Complete Forum and Search --> : response.redirect problem


erenshte
10-16-2004, 10:31 PM
Guys,

I have a very simple problem.
My login script works within frame.
After login user should be redirected to
the page buildmain.htm that should be
opened in the whole window. Below is
the code I'm using:

response.write "<script>window.open(""buildmain.htm"", ""_top"");</script>"

I have tried to use response.redirect "buildmain.htm"
but it opens page within the same frame.

How can I use response.redirect method to get
this page to be opened in the whole window?

Regards, Dr.Roman Erenshteyn

chrismartz
10-17-2004, 07:38 PM
it aint possible cause frames and windows are client-side...the server doesn't know about these...you would have to use javascript for this

zingmatter
10-18-2004, 03:47 AM
Put this javascript code into the head of your new asp page. It will "break out" of and frame and leave the page as a single page.


<script type="text/javascript">
if (top.frames.length!=0) {
top.location=self.document.location;
}
</script>

Hope this helps