Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Response.redirect and multiple targets 1

Status
Not open for further replies.

gacaccia

Technical User
May 15, 2002
258
US
i have a home page that is a frameset composed of two frames. the bottom frame is an asp page that includes the ability to login. if the login is successful, i want to use response.redirect to replace the current frameset with a new frameset. if the login is not successful, i want the asp login page to reload in the current frame with an appropriate message.

my problem is that there are two potential targets for the next page and i don't know how to specify a different target. i can use the html <base target=&quot;_self&quot;>, but then if the login is successful, the new frameset gets loaded within the current frameset. likewise, i can use the html <base target=&quot;_top&quot;>, but then if the login is not successful, the login page gets loaded on top of the existing frameset.

the simple solution would be if i could specify the target using response.redirect, but my understanding is that asp's response.redirect doesn't have that capability. any ideas on how to resolve this problem?

thanks,

glenn
 
Try this:

If the login is successful then reload the login page with a message of your choice. Add a sub to the body onload event:

<body onload=&quot;doLoad()&quot; .....>

If the login was sucessful, then populate the doload sub with the frame page loading script you would need ie:

sub doLoad()
<%if logginPassed then%>
window.parent.frames(&quot;main_frame&quot;).location.href= &quot;default.asp&quot;
<end if%>
end sub

Load each frame as you like. You can access and manipulate everything in another frame from any frame.

Hope that helps. Jonathan Galpin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top