TinyPortal

Development => Support => Topic started by: plumfine on July 27, 2009, 06:52:53 PM

Title: Auto close Popup on main site closure
Post by: plumfine on July 27, 2009, 06:52:53 PM
I have a popup player on my site and it works great but my question is when someone leaves the site the player is still open.  Does anyone know the code to put into the javascript to close the player when you leave the site? 

I'm using a new updated version of wimpy player.  The older version did close when you left the site and I can't find the old coding and support for wimpy won't answer this question....I've tried several times to get a response from them.
Title: Auto close Popup on main site closure
Post by: Zetan on July 27, 2009, 09:33:45 PM
plumfine, Wimpy's support is rubbish, I know.. I have Wimpy Rave on my site and I've never had a reply to any of my emails, disgusting really when you PAY for a product, yet a FREE product, like TP has great support.

Sorry, no idea what the Javascript for closing the player on exit is. I'd be interested if you do find out.
Title: Auto close Popup on main site closure
Post by: ZarPrime on July 27, 2009, 11:14:31 PM
I don't have time right now to investigate any of these links, but something on the following pages may be helpful ...
Let me google that for you! (http://letmegooglethatforyou.com/?q=javascript+self+close+popup)

if nothing works there, you may want to have a look here instead ...
Let me google that for you! (http://letmegooglethatforyou.com/?q=javascipt+timed+close+popup)

Let us know if you find anything useful.

ZarPrime
Title: Auto close Popup on main site closure
Post by: Zetan on July 28, 2009, 12:19:17 AM
Timed closure isn't what plumfine is referring to. Closure of the Popup when the main site is closed, is.

Let me refer you to the Wimpy Documentation:

http://www.wimpyplayer.com/customize/customize_popup.html

http://www.wimpyplayer.com/docs/rave/customizer.options.html

http://www.wimpyplayer.com/support/index.html

None of which mention anything to do with Popup Closure on site closure. I have never seen this option mentioned before, not to say it doesn't exist.

Title: Re: Auto close Popup on main site closure
Post by: Zetan on July 28, 2009, 12:39:29 AM
I've split this into a new topic as it's related, but an entirely different question.
Title: Re: Auto close Popup on main site closure
Post by: ZarPrime on July 28, 2009, 12:42:32 AM
How about this ...
http://www.codingforums.com/archive/index.php/t-141037.html

or this ...
http://www.askmehelpdesk.com/javascript/how-close-all-childwindows-popup-window-when-closing-parent-window-108131.html

I haven't tried either method.

ZP
Title: Re: Auto close Popup on main site closure
Post by: mc on July 28, 2009, 09:46:31 PM
You'll need to look into the DOM (Document Object Module) to see how child windows are handled and fit into the DOM structure.
Once you've identified how the child window fits into the DOM, you can then use javascript to manipulate the child window.

I've touched on it briefly, but can't remember the ins and outs of it, however I seem to remember IE and FF treat the parent/child relationship slightly differently, and require additional coding to work around it.
Title: Re: Auto close Popup on main site closure
Post by: Zetan on July 28, 2009, 11:19:02 PM
plumfine, please use the code tags when posting code:



<insert code here>




You can either use:

[code ]

<insert code here>

[/code ]

No spaces, or paste the code, highlight it all and hit the # from the BBC buttons. You probably already know this.




I have to say it again... Popup windows can be a real pain in ze rear!