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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frames and Response.Redirect

Status
Not open for further replies.

Mighty

Programmer
Feb 22, 2001
1,682
US
I have a page that has three frames - banner, navbar and main. When the user clicks logout (in either the navbar or main frame) I want the home.asp page to display in the main frame but I also want to change the navigation bar. When logout is clicked, an ASP page is called which does a Session.abandon and then a response.redirect to home.htm. In the body tag of home.htm I have an onload event which sets the navigation bar. This works when the home page is initially loaded. However, it the site is redirected to this page using response.redirect, the navigation does not get loaded.

Any ideas?? Mise Le Meas,

Mighty :)
 
Hi

use javascript

since the user will be clicking either on the navbar or on the main page to logout you can change where he clicks that frame can be changed using the html link and the other frame can be changed using a script of this format

this code goes into the head

Code:
<script language=&quot;JavaScript&quot;>
 function toped(holed) {

 var tested = holed
 parent.topFrame.location= tested

}
</script>

this in the logout link

Code:
 onClick=&quot;toped('xxx.htm')&quot;
Regards Unicorn11
unicorn11@mailcity.com

[red]Luck is not chance, it's toil; fortune's expensive
smile is earned.[red]
 
Unicorn11,

Thanks for the suggestion. Unfortunately, that will not work as I am using a DHTML navigation system that I downloaded from the net and it only allows me to specify the target for a link. I don't know how I can specify an onClick event. I can do that for the link in the main page but I cannot do it for the link in the navigation bar.

Nick. Mise Le Meas,

Mighty :)
 
Managed to figure out a way of building the onClick event into the DHTML menu. Thanks for your input. Mise Le Meas,

Mighty :)
 
Don't know how you did it, but when I downloaded one of those widgets that only allowed for a target, I just put &quot;javascript:functionName();&quot; as the target, and it worked nicely.

 
link9,

In the code I downloaded from Javascript.internet.com, it allowed you to sepcify a URL and target frame for each link. I just modified this to allow onClick event code also. It is working fine.

Mise Le Meas,

Mighty :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top