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

Reloading Just Once - Please Read

Status
Not open for further replies.

CandieCane

Programmer
Apr 9, 2002
25
US
This is the third place I had asked this question... I know there's been alot of people who've asked the same question but mine's a little different. Let me explain...

I am using Frames. I have 3 frames (top, left & main) in which the left frame is the navigational links, top is the logo and main which displays all information. In the links on the left frame there's an admin logon which displays in the main frame & prompts the user to enter a userid and password. Upon clicking the logon button, it goes to an asp page that determines wether the user exists in our database and returns a Session variable set to "yes" if he is. In the left frame, I have an if statement saying that IF the Session variable is true, it will display the same links as when you entered but with some extra and ELSE being the links displayed for the normal user. This if statement, with the Session variable, works fine but in order to see those additional links I need to reload my page just once!

If anyone knows how, or has any ideas, please submit!

Thank you!!! Candie ;o)

"Never forget what you learn & learn from what you forget!"
 
I use a single reload of a page to check for cookies, and this method could work for you:

var thispage=location.href;

if (thispage.indexOf('?') == -1)
{
//perform other tasks here to ensure validation, whatever
location.href=thispage + '?';
}

What this does is check to see if the question mark is in the URL, and if it isn't, then reload the page.

The second time in, the question mark is there, so the page doesn't perform the login/validation.
 
CANDIE! How many forums have you posted this in? Answer is in the Dreamweaver forum Derren
[Mediocre talent - spread really thin]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top