Click to See Complete Forum and Search --> : Launching Pop Up Windows


japlon2001
12-09-2002, 07:48 AM
I am currently creating a site that acts as a database. Essentially a few data pages with an awful lot of navigation pages. The problem i am having is that some of the data overlaps. So the navigation essentially needs to point to two different places.

The person I am building this for would like to see a pop up window in this situation advising of the overlap and giving links to the different data sources.

What I want to achieve is launching the POP up window with generic text and specified links with Javascript/DHTML from within an HTML structure like this

<FORM>
<OPTION VALUE="#">the pop up window javascript with links</OPTION
<FORM>

eg. the option tags are part of a jump menu.

I am confident with HTML but Javascript is reasonably new to me. I have used free code from the internet before in my sites but never had to code any by hand.

Does anyone know if this is possible?

What code I need to use?

Where the code should sit on the page?
ie <HEAD> or <BODY> or before </OPTION>

If this isn't possible an alternative approach

Thankyou for your help in anticipation.

Japlon2001

ShrineDesigns
12-12-2002, 11:39 PM
this will do the trick
<html>
<head>
<title></title>
<script language="JavaScript" type="text/JavaScript">
<!--

function openWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
//-->
</script>
</head>
<body>
<form action="" method="get" name="myForm">
<select name="myList" size="1" onChange="openWindow(this.value,'myLink','width=400,height=200')">
<option>Choose A Link</option>
<option value="http://www.111.com/">link 1</option>
<option value="http://www.222.com/">link 2</option>
<option value="http://www.333.com/">link 3</option>
</select>
</form>
</body>
</html>