p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Javascript How-To (http://p2p.wrox.com/forumdisplay.php?f=87)
-   -   Pop Up Window crashes browser (http://p2p.wrox.com/showthread.php?t=2867)

higgsy August 17th, 2003 08:41 AM

Pop Up Window crashes browser

Weve got a javascript function on our website that opens a popup window. Within the popup window is a dynamic flash movie, basically its a streaming flash mp3 player.

You can view this at www.imgifted.co.uk/music and clicking on any of the Lo-Fi or Hi-Fi links.

The problem that weve got is that if you have listened to a few different tracks, i.e. by closing and reopening the flash window the browser sometimes crashes. At this point we cant conclude whether its the Javascript that opens the window that is crashinbg the browser or whether its the flash movie.

The javascript is :

<a href="#" class="BlackSmallText" onClick="window.open('../testplayer/player.asp?player=low&id=46&type=2','PLAYER','widt h=286,height=121');"> link </a>

Has anyone heard of javascript crashing the browser like this before,a nd if so does anyone know of a fix.

Thanks in advance

Al Higgs

joefawcett August 18th, 2003 03:32 AM

You should try returning false after calling window.open:

<a href="#" class="BlackSmallText" onClick="window.open('../testplayer/player.asp?player=low&id=46&type=2','PLAYER','width=286,height=121');return false"> link </a>
This will prevent the browser from doing its normal action of resolving the href attribute.



All times are GMT -4. The time now is 01:35 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.