Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Jump Menu ---> Pop Up Window

Jump Menu ---> Pop Up Window
Thread Tools
Junior Member
Join Date: Mar 2003
Status: Offline
Reply With Quote
Dec 4, 2003, 03:01 AM
 
Hello ...


I was wondering if anyone can help me. I have a java script I would like to make a couple 'options' in each drop down open as a pop up window.

-- Here is the Script i will be using --

<script>
<!--
function openWin(url,width,height) {
var Win = window.open(url,"openWin",'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no,status=no' );
}
//-->
</script>


------

On a previous site, I would put this HREF in from of say an image to activate it.

<a href="javascript:openWin('main.html',400,300)">

-------



HERE is the Actual Drop Down I would like to make open using it.


<form name="form1" method="post" action="">
<select name="BGR" onChange="MM_jumpMenu('parent',this,0)">
<option selected>SELECT STORE</option>
<option> </option>
<option value="stores/0008.html">Mile Square Bar &amp; Grill </option>
<option value="stores/00010.html">Sparows Wine &amp; Liquors </option>
<option value="stores/00011.html">The Liberty Bar</option>
<option>- - - - - - - - - - - - - - -</option>
<option value="http://www.brinleygoldrum.com/ny/find.ny.town.html">NEW
YORK</option>
<option value="http://www.brinleygoldrum.com/pa/find.pa.town.html">PENNSYLVANIA</option>
</select>
</form>
     
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status: Offline
Reply With Quote
Dec 4, 2003, 07:20 AM
 
you might want to edit that post, and use CODE tags, so we can see your code a bit better
"Have sharp knives. Be creative. Cook to music" ~ maxelson
     
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Dec 4, 2003, 01:40 PM
 
Originally posted by iHanhauser:
HERE IS THE PROBLEM ... I MADE A Little web page, soi could display the code for everyone


http://www.netape.com/CODE/


please help me ...


thanks

ihanhauser
can't you just define the target as _newWindow in the link? also, let the other thread die and keep all responses in this one, thanks
Travis Sanderson
     
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Dec 4, 2003, 06:05 PM
 
iHanhauser emailed me about the problem and I gave him some working js. Maybe not the purdiest solution but I'm not a big js guy Works in Safari and Internet Explorer:
[php]
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
if(selObj.options[selObj.selectedIndex].value.indexOf("store") != -1) //equals -1 if store not found
window.open(selObj.options[selObj.selectedIndex].value);
//if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>

<body>
<form name="form1" method="post" action="">
<select name="BGR" onChange="MM_jumpMenu('newWindow',this,0)">
<option selected>SELECT STORE</option>
<option> </option>
<option value="stores/0008.html">Mile Square Bar &amp; Grill </option>
<option value="stores/00010.html">Sparows Wine &amp; Liquors </option>
<option value="stores/00011.html">The Liberty Bar</option>
<option>- - - - - - - - - - - - - - -</option>
<option value="http://www.brinleygoldrum.com/ny/find.ny.town.html">NEW
YORK</option>
<option value="http://www.brinleygoldrum.com/pa/find.pa.town.html">PENNSYLVANIA</option>
</select>
</form>
</body>
[/php]

On a side note, why does HTML still render in the code tag, but not the php tag?
Travis Sanderson
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 02:29 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2