HighDots Forums  

jump menu

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss jump menu in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
fatpad
 
Posts: n/a

Default jump menu - 07-04-2004 , 08:12 AM






I often use jump menus in my sites to save space if I need to list lots of
documents such as PDF files. I have noticed though that I can only open the
files in the main browser window and not as a blank page, so everytiem you
click on a selected document and then close it, the whole site closes too. I
put links on the documents so that people have a way to return to the site but
i know there should be a way to hard code the java script that controls the
jump menus. Does anyone out there know how to do this?

Please help, I have fiddled with the code but to no avail.

Karin form South Africa

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>

<select name="menu1" onChange="MM_jumpMenu('parent',this,1)" width="200">
<option selected>Terranews 2002: from 1-16</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 01.pdf"
target="_blank">1) Composite
wall, 9m high</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 02.pdf"
target="_blank">2) Noise
barrier, 6m high</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 03.pdf"
target="_blank">3) Erosion
control on rivers</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 04.pdf"
target="_blank">4) Terraforce
diversion weir</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 05.pdf"
target="_blank">5) Compliance
with I.B.C. and U.B.C.</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 06.pdf"
target="_blank">6) Kinky
culvert</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 07.pdf"
target="_blank">7) Tygervalley
office park</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 08.pdf"
target="_blank">8) Composite
rock-face (domestic)</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 09.pdf"
target="_blank">9) Vertical
cladding (bridge abutment)</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 10.pdf"
target="_blank">10) Vertical
wall, 6m (domestic)</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 11.pdf"
target="_blank">11) Founded
in mud</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 12.pdf"
target="_blank">12) World
Summit (WSSD) in JHB</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 13.pdf"
target="_blank">13) C.M.A.
Premier Award 2002</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 14.pdf"
target="_blank">14) Water
features (landscaping)</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 15.pdf"
target="_blank">15) Vintage
Terraforce</option>
<option value="TERRANeWS 1 - 20/TERRANeWS 16.pdf"
target="_blank">16) Cost-effective
seating - Didata</option>
</select>


Reply With Quote
  #2  
Old   
Gary White
 
Posts: n/a

Default Re: jump menu - 07-04-2004 , 09:05 AM






"fatpad" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I often use jump menus in my sites to save space if I need to list lots of
documents such as PDF files. I have noticed though that I can only open
the
files in the main browser window and not as a blank page, so everytiem you
click on a selected document and then close it, the whole site closes too.
I
put links on the documents so that people have a way to return to the site
but
i know there should be a way to hard code the java script that controls
the
jump menus. Does anyone out there know how to do this?

Delete this code:

Quote:
script language="JavaScript" type="text/JavaScript"
!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0

eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//--
/script

Change this line:

Quote:
select name="menu1" onChange="MM_jumpMenu('parent',this,1)" width="200"

To this:

<select name="menu1"
onChange="window.open(this.options[this.selectedIndex].value)">


Gary




Reply With Quote
  #3  
Old   
fatpad
 
Posts: n/a

Default Re: jump menu - 07-04-2004 , 10:30 AM



Thanks very much...I had no idea it would be such a small change......
Much appreciated.

Karin

Reply With Quote
  #4  
Old   
Gary White
 
Posts: n/a

Default Re: jump menu - 07-04-2004 , 11:17 AM



"fatpad" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Thanks very much...I had no idea it would be such a small change......
Much appreciated.

You're welcome.

Gary




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.