Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript "Log Off"/"Log Out" Code

    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.
    Attached Thumbnails Attached Thumbnails Javascript &quot;Log Off&quot;/&quot;Log Out&quot; Code-9-13-2008-9-02-56-am.jpg   Javascript &quot;Log Off&quot;/&quot;Log Out&quot; Code-9-13-2008-9-04-37-am.jpg   Javascript &quot;Log Off&quot;/&quot;Log Out&quot; Code-9-13-2008-9-07-54-am.jpg  
    Last edited by joS3ph; 09-15-2008 at 09:10 PM.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    Quote Originally Posted by joS3ph View Post
    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

  • #3
    New Coder
    Join Date
    Jul 2008
    Location
    Peterborough - UK
    Posts
    63
    Thanks
    4
    Thanked 9 Times in 9 Posts
    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:

    Code:
    <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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •