Frames and links.

They have: 330 posts

Joined: Apr 2000

I have created an internal website for a technical support team which requested frames for the top and left navigational menus. The left side has a guests menu until the rep signs in using an ASP based login script on the left frame. Once it logs the rep in the page refreshes to a new menu which consists of links necessary for troubleshooting.

How would I make the left frame and main frame refresh themselves when the user signs in?

I have tried sending the user to a new page which unloads the frames and then recreates them with the correct pages. That crashes Netscape and it's kind of a sloppy way to do it.

Any other suggestions?

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

try something like:
parent.frame_name.document.location = 'here.asp'

They have: 330 posts

Joined: Apr 2000

Thank you.

I'm sure that is the answer, but I don't know where to apply that.

Should I make it as part of the onLoad function for the left frame? If I do that it will be changed every time someone refreshes their browser.

I am setting cookies with ASP which is what is giving the rep access to the website and the screen which I'm trying to have displayed when he/she signs in. If I used that during the onClick it would do it before the rep could get the cookies so it would deny the rep.

When would this take place?

If I had the login page authenticate the rep and then redirect again to another page which has this loaded as the onLoad event it will have time to load the cookies. Is this the best way to handle it?

Thanks again for your help.

They have: 330 posts

Joined: Apr 2000

I figured it out, thanks.

Incase you're interested in what I did...

I add the redirection to include a QueryString of Refresh=Yes. I then created an If..Then..Else statement which says if Request.QueryString("Refresh") = "Yes" Then go along with the OnLoad function, else just load the body.

Thanks again for your help.

And please let me know if there is a better way to do this.

They have: 330 posts

Joined: Apr 2000

I thought it was done but it's not. I am still in the same place I was before where a refresh will reload the last selection from the drop-down box. That is the least of my problems with this form though.

While testing I realized the user can only redirect once. Once the page already has been redirected using the drop-down box no other selection from the drop-down box works. I get an "Access Denied" error when I try to use the script. The error is referring to the line which loads the MainWindow.location.

Any help would be greatly appreciated.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.