Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
| Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript 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 February 15th, 2005, 03:02 PM
Friend of Wrox
 
Join Date: Jun 2004
Location: Montreal, Quebec, Canada.
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Default opening a pop up from a list menu

Hi,
I have two related drop-downs that are populated by Javascript arrays.
I would like one of those selections to open in a pop-up --- ONLY one.
Here's the chunk of code from the second drop-down where I want the first link to open in a pop-up: Obviously this code is not working but I thought it was the best way to "tell" you what I want to do...


************************************************** ***
....

group[1][0]=new Option("Select your model"," ");

group[1][1]=new Option("ModelName","page.asp","","location=no,menu bar=no,directories=no,width=500,height=300,menubar =no,resizable=no,toolbar=no");

group[1][2]=new Option("ModelName2","page2.asp");

....

************************************************** ***

Any help is always appreciated,

Nancy
  #2 (permalink)  
Old February 16th, 2005, 04:01 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
Default

You can't just add a few parameters and expect code to work. If you want to open a popup when someone chooses the second item in your listbox then you need to have an onchange handler on it. Then you can test if the option chosen is the second one and then use window.open.

Look here for the onchange event and also the window.open method:

http://msdn.microsoft.com/library/de...ence_entry.asp

--

Joe (Microsoft MVP - XML)


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar pop up window not opening absu ASP.NET 1.0 and 1.1 Basics 1 October 19th, 2008 10:59 AM
Pop up menu with frames pmcquirk Javascript How-To 2 May 7th, 2004 09:29 AM
The problem with pop-up menu and dropdown list williamwang ASP.NET 1.0 and 1.1 Basics 1 April 14th, 2004 02:33 PM





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