The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Jump Menus, How do I make my Jump menu "jump" to a new window?
MommaWard
post Apr 22 2008, 05:41 PM
Post #1





Group: Members
Posts: 3
Joined: 22-April 08
Member No.: 5,494



Hi all,
I am VERY new to HTML. I work mostly within the Mac application of iWeb, but have been fiddling around with HTML within this application to get it to do what I want when the application isn't made to do it. For example: Drop-Down, Jump Menus. I finally figured out the code for a Jump Menu that will work within my iWeb application ~ but now I'm wondering what I need to change in this code to get it to 'jump' to a NEW window? Can anyone read this HTML code and tell me what I need to change?

Thanks for any input.
MommaWard


Code:

<script 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>
<form name="form1">
<select name="Click to see an EA Top Movie Clip" onChange="MM_jumpMenu('parent',this,1)">
<option>Click to see an EA Top Movie Clip</option>
<option value="http://web.mac.com/margaretward/JC/JC.html">The New Media, Science & Fine Arts Center</option>
<option value="http://web.mac.com/margaretward/US_Chorus/Song.html">Upper School Chorus - "I Will Rise"</option>
<option value="http://web.mac.com/margaretward/Speeches/Welcome.html">Senior Speeches</option>
<option value="http://web.mac.com/margaretward/EA/Cory.html">"EA Productions" by Cory Ebert</option>
<option value="http://web.mac.com/margaretward/EA/NBA.html">"Where It Happens" by Paul Leonardis</option>
<option value="http://web.mac.com/margaretward/EA/Eyes.html">"The Eyes of a Child" by Salley M. & Catherine S.</option>
<option value="http://web.mac.com/margaretward/EA/PSA.html">7th Grade Public Service Announcement</option>
<option value="http://web.mac.com/margaretward/EA/Camp.html">"Timber-lee Rocks"" by Jimmy Jirsa</option>
<option value="http://web.mac.com/margaretward/EA/Valentine.html">Kindergarten Valentine's Day Party</option>
</select>
</form>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Apr 23 2008, 07:53 AM
Post #2


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



This is a javascript question, so I move the thread to the client-side scripting forum.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
MommaWard
post Apr 23 2008, 05:34 PM
Post #3





Group: Members
Posts: 3
Joined: 22-April 08
Member No.: 5,494



Thank you ~
now I wait to see if anyone knows the answer! smile.gif
Thanks.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
shengja
post May 14 2008, 12:42 AM
Post #4





Group: Members
Posts: 5
Joined: 6-May 08
Member No.: 5,587



try placing target="_blank" after the link in <option value>

For example:
<option value="http://www.yahoo.com" target="_blank">Yahoo</option>


____________________________________________________________
brochure printing
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
ericditmer
post May 15 2008, 01:53 PM
Post #5





Group: Members
Posts: 3
Joined: 15-May 08
Member No.: 5,662



This should do the trick:
CODE
<script language="JavaScript">
function gotowindow() {
     var dest = document.getElementById('destination').selectedIndex;
     window.open(document.getElementById('destination').options[dest].value,
     target="body");
}

</script>
<select name="destination" id="destination" onchange="gotowindow()">
<option value="http://www.google.com">Google</option>
<option value="http://www.yahoo.com">Yahoo!</option>
</select>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
MommaWard
post May 30 2008, 11:35 AM
Post #6





Group: Members
Posts: 3
Joined: 22-April 08
Member No.: 5,494



Thank you!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th April 2024 - 05:45 PM