Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
Featured Web Site Template

Hundreds More at Free Site Templates.com!

Web Site Partners
Sponsored Links
Jet City Software
 
Whos Here ?
Reflects user activity within the last 5 minutes
Moderator(s): Prowler, jcokos
Member Message

redstarweb
Joined: Sep 22, 2004
# Posts: 2

View the profile for redstarweb Send redstarweb a private message

Posted: 2004-Sep-22 22:42
Edit Message Delete Message Reply to this message

Hello readers of this post,

Perhaps this is the wrong place to post my question, but I just try.

I have protected one of my folders using the Cpanel option and I have added some users who are allowed to enter this folder.
When I open a page in this folder I will get the wellknown grey login window with the question to enter the username and password. This is working fine.

What I like to do is to create a 'Logout' link/button on the first page I arrive after my login. The only way to logout is to close the whole browser session.

Is there for example a Javascript function to create a Logout link on my site, working in such way that when I (or one of my site users) click on the Logout link, it will return to a certain page without first closing the whole browser session?

Thanks for any advice

kind regards,
Bart Dirks
The Netherlands




Prowler
Staff
Joined: Aug 14, 2000
# Posts: 1788

View the profile for Prowler Send Prowler a private message

Posted: 2004-Sep-23 14:26
Edit Message Delete Message Reply to this message

As in Perl, there are many ways of doing the same. One is to create a link structure in a framed page for the links. Then invoke the login page. Use something like the following:

function where_to()
{
if (window.top.location == window.self.location)
{
window.self.close();
}
if(window.top.location != window.self.location)
{
window.location.href = "/content.html";
}
}
Where the content page is the page you want the visitors to go after the log out. But if you call this script from a page without a frame it will close the page.





redstarweb
Joined: Sep 22, 2004
# Posts: 2

View the profile for redstarweb Send redstarweb a private message

Posted: 2004-Sep-23 22:47
Edit Message Delete Message Reply to this message

Thanks for your advice, I will try this one.

kind regards,
Bart


You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
  1. You have not yet logged in, or registered properly as a member
  2. You are a member, but no longer have posting rights.
  3. This is a private forum, for which you do not have permissions.

If you are a recent member, it's possible that you simply have not yet confirmed your account. Please check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions contained within.

If you cannot find this message, click here to Re-Send it.

If you are still experiencing problem, please read the Login Assistance Article for some advice on what may be causing your login not to work properly.

Switch to Advanced Editor and ... Create a New Topic or Reply to this Thread

New posts Forum is locked
© 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions