...

View Full Version : Javascript "Log Off"/"Log Out" Code



joS3ph
09-15-2008, 10:07 PM
Note: I originally posted this question in the "HTML" forum, but was told I would have to use JavaScript and not HTML.

I recently purchased a program called WWW File Share Pro (see http://www.wfshome.com/). I am going to use this program to share files with members of my family (documents, photos, etc.).

The following "snipets" of code appear in the "HTML" options of the WWW File Share Pro program itself (see attached image 9-13-2008 9-02-56 AM):

Click <a href="javascript:history.back()">&lt;&lt;&lt;Back</a> or <a href="javascript:history.back()"><img src="/icon15.gif" width="16" eight="16" border="0"></a> to go back.

Click <a href="/">Home</a> to visit homepage.

Click <a href="/upload1.htm">Upload</a> to upload file.

Immediately after setting up and running the program, I discovered that there was NO option to actually "log off" or "log out" of the program when the user completes whatever tasks he/she so desires. I have attached images of the "html options" page, the "login" screen (IP address obliterated), and the "user" screen.

The only options available to the user are as follows (see image 9-13-2008 9-07-54 AM):

"Back"
"Home"
"Upload"

I would like to add a "Log Off" or "Log Out" option so that the user could click a link to log out, instead of just closing the web page itself. Closing the web page itself does not "log out" the user.

Is there anyone on this forum that could assist me with adding the proper code to make a "log off/out" link? Is it even possible?

Can someone recommend a good beginner's book on JavaScript? I don't really understand that much about JavaScript, so I'll definitely need a book geared to the absolute beginner.

Any assistance with this would be much appreciated.

Thanks!

Joseph Y.

Philip M
09-16-2008, 09:24 AM
Can someone recommend a good beginner's book on JavaScript? I don't really understand that much about JavaScript, so I'll definitely need a book geared to the absolute beginner.


http://www.codingforums.com/showthread.php?t=147902

Mikebert4
09-16-2008, 09:56 AM
Ok, this is quite simple actually.

The password box that pops up is for a protected folder on a server, anyone who wants to access (view/edit/upload) anything within the folder must have the password. 'Logging out' is simply the action of navigating away from that folder.

hence, a good 'logout' script would be somthing as simple as:



<a href="'http://www.google.co.uk">Logout (google)</a>


I'm sure one of the big boys around here will either confirm this or present other options fairly quickly :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum