Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 17th, 2003, 08:41 AM
Registered User
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to higgsy
Default 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
  #2 (permalink)  
Old August 18th, 2003, 03:32 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

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.



Similar Threads
Thread Thread Starter Forum Replies Last Post
Window refresh and window pop up in Java Script Aleksandra Javascript How-To 2 March 2nd, 2007 06:47 PM
Launch default browser in a new browser window haiying Beginning VB 6 1 August 30th, 2005 05:48 PM
VBE window crashes due to Lack of memory? DBoulos Access VBA 2 December 28th, 2003 05:27 PM

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