Javascript help
#1
Scooby Regular
Thread Starter
Join Date: Nov 2000
Location: Glasgow
Posts: 1,432
Likes: 0
Received 0 Likes
on
0 Posts
Is anybody good with javascript and Dreamweaver. I have a page with a drop down menu in it and want it to display a pop up window when a selection is made. The HTML below was created in Dreamweaver but only allows changes in the main browser window. where do I put the window.open command to get a pop up window to appear.
Cheers
Jer
<html>
<head>
<title>Untitled Document</title>
<meta **********="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 233px; top: 56px">
<form name="form1">
<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
<option value="page1.htm" selected>page1</option>
<option value="page2.htm">page2</option>
</select>
</form>
</div>
</body>
</html>
Cheers
Jer
<html>
<head>
<title>Untitled Document</title>
<meta **********="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:1; left: 233px; top: 56px">
<form name="form1">
<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
<option value="page1.htm" selected>page1</option>
<option value="page2.htm">page2</option>
</select>
</form>
</div>
</body>
</html>
#2
Scooby Regular
Join Date: Jul 2000
Location: Islington
Posts: 2,145
Likes: 0
Received 0 Likes
on
0 Posts
put this open window function in the head section
function ow(url) {
mywin = window.open(url,"win",'toolbar=0,location=0,direct ories=0,status=0,menubar=0,scrollbars=0,resizable= 0,width=550,height=400');
}
call with
<A HREF="javascript w('link_here.htm')">link text here</a>
function ow(url) {
mywin = window.open(url,"win",'toolbar=0,location=0,direct ories=0,status=0,menubar=0,scrollbars=0,resizable= 0,width=550,height=400');
}
call with
<A HREF="javascript w('link_here.htm')">link text here</a>
#3
Used to work here!!
Join Date: Jun 2000
Location: Peterhead, Scotland
Posts: 1,488
Likes: 0
Received 0 Likes
on
0 Posts
Obviously the embarrassment ( ) smilie face should not be there.
It should be javascript : ow without the spaces.
Stuart
[This message has been edited by sasim (edited 19 September 2001).]
It should be javascript : ow without the spaces.
Stuart
[This message has been edited by sasim (edited 19 September 2001).]
Thread
Thread Starter
Forum
Replies
Last Post
CodeKey@Lisan
Computer & Technology Related
11
20 February 2004 05:23 PM
RichB
Computer & Technology Related
2
05 November 2003 02:27 PM