Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7

Thread: Frames - logout

  1. #1
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    I have a site with a login. Once logged in, you are taken to the main site, thats split up into 3 frames(left,top and main).

    Theres a logout button in the top frame.

    The problem is - how do I make the link take you back to the login page? Since the logout link is in a frame, it only replaces the top frame with the login page, not the whole page.

    Help?

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    hey. its simple
    Code:
    <form>
    <input type="button" onClick="parent.sampleframe.location.href='http://google.com'">
    </form>
    <a href="http://google.com" target="sampleframe">dfgreg</a>
    
    <iframe name="sampleframe" border="0"></iframe>
    Change samleframe to the name of your frame. I used an iframe as I have not really used frames, but as long as it has the same name itll be ok.

    change google.com to loginpage.htm

    and give the main content frame the name you want to change.

  4. #3
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    Sounds simple enough. thanks. quick question, now theres going to be a button on my page aswell?

    Which is the logout button? the link or the button?

  5. #4
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    sorry, i done the link just for a quick check.

    if you want the link, get rid of the form, or vice versa.

    sorry

  6. #5
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    Ok, the technique you told me wont work. I have 3 frames. named 'top', 'left' and 'main'.

    At the moment I have the logout button in the 'top' frame. If I have a link like this: <a href="login.html" target="main">logout</a> It will replace the 'main' frame with the loginpage leaving the 'top' and 'left' frame still there.

    I need a way of replacing the whole framset with a normal html page...

  7. #6
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    Maybe theres a way of doing this in Javascript? Im not sure.

    Any help?

  8. #7
    Senior Member jbagley's Avatar
    Join Date
    Sep 2004
    Location
    Cape Town
    Posts
    845
    Member #
    7422
    Ok, I solved this problem myself.

    <a href="login.html" target="_parent">logout</a>

    So ja, whatever. :angry:


Remove Ads

Posting Permissions

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

Search tags for this page

how to use logout link in html for frame

Click on a term to search for related topics.
All times are GMT -6. The time now is 09:18 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com