referring to a target frame

Results 1 to 2 of 2

Thread: referring to a target frame

  1. #1
    ceejay Guest

    Default referring to a target frame

    I am using a simple authentication system passing the user through an include asp script ( before authorizing access to the page. Since the unauthorized user may be in a frameset at this point, I want the include file to redirect to a "badlogin" page and target it to a new window (_top) in order to wipe out the previous frameset load. Here&#039s my include file code:<BR><BR>&#060;%<BR> If Session("Authenticated") = 0 Then<BR> Response.Redirect ("/crewpages/frames/frontdoor/authorize/badlogin.asp")<BR> End If<BR>%&#062;<BR><BR>Can this page ("badlogin") simply be targeted as "_top" within this code somehow or is this a no-no? Thanks for any help.

  2. #2
    KPW Guest

    Default RE: referring to a target frame

    In your "badlogin.asp" file, you can have a check like so:<BR><BR>function checkFrame() {<BR>if (top.frames.length > 0) {<BR>top.location.href = badlogin.asp;<BR>}<BR>}<BR><BR>Then call that function when the page loads.<BR><BR><BODY onLoad="checkFrame()"><BR><BR>HTH

Posting Permissions

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