www.webdeveloper.com
Results 1 to 3 of 3

Thread: response.redirect problem

  1. #1
    Join Date
    Jan 2004
    Location
    Wilmington, DE, USA
    Posts
    15

    Angry response.redirect problem

    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
    RAMZER

  2. #2
    Join Date
    Jun 2003
    Location
    Indiana, USA
    Posts
    1,138
    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
    Chris.Martz.me
    Some things Man was never meant to know. For everything else, there's Google.

  3. #3
    Join Date
    Mar 2004
    Location
    Glasgow, Scotland
    Posts
    613
    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.

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

    | Web Design and Development in Glasgow - 404i |
    | Blog |

    Code:
    -. .-.   .-. .-.   .-. .-.   .-. .-.   .-. .-.
    ||x|||\ /|||x|||\ /|||x|||\ /|||x|||\ /|||x|||\ 
    |/ \|||x|||/ \|||x|||/ \|||x|||/ \|||x|||/ \|||
    '   '-' '-'   '-' '-'   '-' '-'   '-' '-'   '-'

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles