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

refresh a page 1

Status
Not open for further replies.

bosky

Programmer
Oct 30, 2003
15
IN
Hi There!

I have a page which consists 2 framesets. Everytime the page refreshes it checks whether the user is logged in. If the session happens to expire it displays that the user is not logged in currently.

So what i want to do is force the user out from both the framesets and display the above message only in one page. is there any way through which i can do that?

Urgent help required on this one.


 
Are you using server-side script to make sure that they're logged in? ASP, PHP, ColdFusion?

Send this code back to the client...

<script>
top.location = &quot;logOut.asp&quot;
</script>

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
I am using PHP as scripting side language. I am pasting my check login code as follows

<?php
if (!$global_user_ID or $global_user_ID == &quot;&quot;)
{
echo
(
&quot;<style type=\&quot;text/css\&quot;>
.check_login_text {font-family: Verdana, Arial, sans-serif; font-size: 10px; font-style: normal; font-weight: bold; color: #333333}
a.check_login_link {font-family: Verdana, Arial, sans-serif; font-size: 10px; font-style: normal; font-weight: bold; color: #990000; text-decoration: none}
a.check_login_link:hover {font-family: Verdana, Arial, sans-serif; font-size: 10px; font-style: normal; font-weight: bold; color: #990000; text-decoration: underline}
</style>

<div align=\&quot;center\&quot; class=\&quot;check_login_text\&quot;><br><br><br>You are not currently logged into the application. Please <a href=\&quot;&quot;.$login_location.&quot;\&quot; target=\&quot;_top\&quot; class=\&quot;check_login_link\&quot;>login</a> now</div>&quot;
);
exit();
}

?>

 
Don't know PHP, but this looks right...

<?php
if (!$global_user_ID or $global_user_ID == &quot;&quot;)
{
echo
(&quot;
<script>
top.location = &quot;logOut.asp&quot;
</script>
&quot;)
exit();
}

?>


Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
Hey tks a lot...

ur piece of code works. :-D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top