catonthecouchproductions
asked on
Lightbox - Javascript - refresh
If you go to http://www.newspapersofamerica.com/new/ and click "Login" on the top right
You can use demo/demo to login
When you login, click logout at the top it brings up the other lightbox, when you click logout see how it still shows it at the top, but if you refresh it removes it, I want to have it say "login" not the:
Welcome demo, you are logged in, logout.
Any ideas? I am using this: http://jquery.com/demo/thickbox/ for that effect.
Thanks,
Ryan
You can use demo/demo to login
When you login, click logout at the top it brings up the other lightbox, when you click logout see how it still shows it at the top, but if you refresh it removes it, I want to have it say "login" not the:
Welcome demo, you are logged in, logout.
Any ideas? I am using this: http://jquery.com/demo/thickbox/ for that effect.
Thanks,
Ryan
once you close the popup after clicking esc or the close link... se if you can refresh the parent page which clears the message and shows the login page.
ASKER
How would I refresh the page? I want to see if I can do it automatically after I click the logout and when it goes back I want it to refresh the page.
ASKER
Once you click logout and close the box and refresh it does log you out, but when you click logout, I want it to do it automatically refresh the page, so when you close it, it says "Login" not the Logout.
instead of calling the logout php from href call a script method and from there call it like below
window.showModalDialog(url );
self.document.location.rel oad(true);
hope it helps
window.showModalDialog(url
self.document.location.rel
hope it helps
ASKER
So I have:
<a href="logout.php?height=13 5&widt h=300" class="thickbox" title="Log out">Welcome '. $s_username . ', you are logged in, logout.</a>
Instead of making it that, you said use:
window.showModalDialog(url );
self.document.location.rel oad(true);
How would i add in what you said?
Thanks,
Ryan
<a href="logout.php?height=13
Instead of making it that, you said use:
window.showModalDialog(url
self.document.location.rel
How would i add in what you said?
Thanks,
Ryan
something like
<a href="javascript:myfunctio n()" class="thickbox" title="Log out">Welcome '. $s_username . ', you are logged in, logout.</a>
function myfunction()
{
window.showModalDialog("lo gout.php?h eight=135& amp;width= 300");
self.document.location.rel oad(true);
}
<a href="javascript:myfunctio
function myfunction()
{
window.showModalDialog("lo
self.document.location.rel
}
ASKER
If you try it now it just shows a the blacked out page with no lightbox, any ideas?
Thanks,
Ryan
Thanks,
Ryan
not sure what is wrong here...
or revert it to the one you had earlier and in the logout.php try this
<body onunload="window.opener.lo cation.rel oad();">
or revert it to the one you had earlier and in the logout.php try this
<body onunload="window.opener.lo
ASKER
Nope, it still has you logged in after you click close.
Any ideas?
Thanks for your help!
Any ideas?
Thanks for your help!
ASKER
I would have thought that that code above would have worked.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for your help!
Ryan
Ryan
ASKER
I have this question as well if you are intersted, I cant figure it out! haha.
Thanks again,
Ryan
Thanks again,
Ryan