homepage Welcome to WebmasterWorld Guest from 54.211.97.242
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
Javascript close window + reload window
syncedit

10+ Year Member



 
Msg#: 250 posted 7:54 pm on Dec 29, 2002 (gmt 0)

For my site I use an session login, to login you first must click on a link that opens a popup window.

If you are logged in the popup window shows "you are now logged in.." and

<form><input type=button value=' Close window ' onClick='javascript:window.close();'></form>

to close the window

But on the original window: "You are logged out, click here to log in (a href popup again)", if you refresh the status changes to logged in.. correct

so.. I'm looking for some javascript code to close the popup window and to (refresh or) reload the original window so that the status changes to "you are logged in"

But i don't know to give the original window a name, and how to combine those 2 javascript codes,

thx!

cedric

 

BjarneDM

10+ Year Member



 
Msg#: 250 posted 9:23 pm on Dec 29, 2002 (gmt 0)
http://www.javascriptfr.com/forum.aspx?Article=283

this should give you enough hints :)

yours in happy hacking
Bjarne - KÝbenhavn ; Danmark ; Europa

tedster

WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 250 posted 12:31 am on Dec 30, 2002 (gmt 0)

Welcome to WebmasterWorld, syncedit. From the pop-up itself you can access the window that opened the pop-up with:
window.opener

So you might use a line of code such as:

window.opener.location.reload()

<added>
It's interesting to note that in the forum BjarneDM linked to, the answer given used refresh(). AFAIK, that is not the EMCAScript standard. It may work in Explorer's jscript, but I'd suggest sticking with reload()

syncedit

10+ Year Member



 
Msg#: 250 posted 1:32 am on Dec 30, 2002 (gmt 0)

thx!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved