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
LVL 1
catonthecouchproductionsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

contactkarthiCommented:
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.
0
catonthecouchproductionsAuthor Commented:
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.
0
catonthecouchproductionsAuthor Commented:
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.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

contactkarthiCommented:
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.reload(true);

hope it helps
0
catonthecouchproductionsAuthor Commented:
So I have:

<a href="logout.php?height=135&amp;width=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.reload(true);

How would i add in what you said?

Thanks,

Ryan
0
contactkarthiCommented:
something like

<a href="javascript:myfunction()" class="thickbox" title="Log out">Welcome '. $s_username . ', you are logged in, logout.</a>

function myfunction()
{
window.showModalDialog("logout.php?height=135&amp;width=300");
self.document.location.reload(true);
}
0
catonthecouchproductionsAuthor Commented:
If you try it now it just shows a the blacked out page with no lightbox, any ideas?

Thanks,
Ryan
0
contactkarthiCommented:
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.location.reload();">
0
catonthecouchproductionsAuthor Commented:
Nope, it still has you logged in after you click close.

Any ideas?

Thanks for your help!
0
catonthecouchproductionsAuthor Commented:
I would have thought that that code above would have worked.
0
contactkarthiCommented:
ok here...

what do you do after the login is successful.(i see the main page goes to a personal page.) you can do the same for logout. take it bact to the main page.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
catonthecouchproductionsAuthor Commented:
Thank you for your help!

Ryan
0
catonthecouchproductionsAuthor Commented:
I have this question as well if you are intersted, I cant figure it out! haha.

Thanks again,

Ryan
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.