Redirects & Frames

Results 1 to 2 of 2

Thread: Redirects & Frames

  1. #1
    Ian Cornish Guest

    Default Redirects & Frames

    Hi,<BR>I have a frameset, with two frames, one for the navigation, one for the data. My problem is I have a "logon" button in the navigation frame that puts a logon screen onto the Data frame. This then passes to an ASP script. The script validates OK, but when I come to redirect back to the navigation screen (to redraw due to the new functions the user has when they logon), I get a whole new frameset in the data window. <BR>How can I specify the target frame on a Response.Redirect or META http-equiv="Refresh" command ?<BR>TIA<BR><BR>Ian

  2. #2
    Gary Van Sluis Guest

    Default RE: Redirects & Frames

    I am sure there is a better way than this but this has worked great for me in the past. Say I had a page like yours with a nav frame and a data frame, we will call this page login.asp. If the user makes a good login, then we show goodnav and gooddata, if the login failes we show badnav and baddata and if it is the first time, we show regularnav and regulardata. The main code for that page I use a select case statment like.<BR><BR>Select Case dowhat<BR> Case "BadLogin"<BR> &#039load bad frameset - badnav and baddata<BR> Case "GoodLogin"<BR> &#039load good login frameset - goodnav and gooddata<BR> Case Else<BR> &#039first time a use has been here<BR> &#039load default or first time login<BR> &#039regularnav and regulardata<BR>End Select<BR><BR>Basically you have Three completely different frameset fragrements. Each with its own &#060;FRAMESET&#062;nav and data frames &#060;/FRAMESET&#062;.<BR>LASTLY - put the variable in a cookie on your asp page that has the variable used in the select case statement. Since with response.redirect you are using a url and it would not be a good idea to see login.asp?login=failed --people would hack their way though your login pretty quick. So on your authentication page set a cooke before you redirect back to this page. And get that varialbe from the cookie and put it in the select case.<BR><BR>I hope that helps.<BR>Gary

Posting Permissions

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