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 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Refreshing a page

    Hi.

    Ive made a page with some PHP in it and an iFrame.

    Rather than telling you all about my site ill just ask for a fix to this problem:

    When the user logs in (through the iframe menu), i need the whole page to refresh ONCE, to allow for the php code to detect the session and remove the "Login" link.

    Could you please help me out and tell me how its doen?

    Thanks, Cobra

  • #2
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Code:
    location.reload()
    That should do the trick.

  • #3
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Do i add that to the iFrame's page? (login_success.php)

    and do i need any code around it?

    //EDIT//

    I just put the location.reload() at the bottom of the php in the file "login_success.php" and it comes back with the error:

    "Fatal error: Call to undefined function: reload()"

    How do i fix this?

    Thanks, Cobra
    Last edited by Cobra; 10-30-2004 at 07:59 PM.

  • #4
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    You can use an event handler to call it, do you need it to refresh when you click something? or when?

  • #5
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No, i just want the index.php to be refreshed when the login_success.php script is executed.

    Cobra

  • #6
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Hmm, i'm not sure I understand correctly, some kind of event must trigger the location.reload(). When they login, put this in for the login button:
    Code:
    <input type="submit" onclick="javascript:location.reload();" value="whatever" name="whatever">
    Or maybe you can post some code, and someone can help you out. But something has to trigger the reload, like an unload, load, click, ect. some kind of event.

  • #7
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I kinda changed what u said and put it in login_success.php, but that just reloaded the iframe, constantly.

    I need it to refresh the whole page, just once.


  •  

    Posting Permissions

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