Jump Menu

liunx

Guest
Hi!<br /><br />Just wondering if someone can tell me where in my code I can set the target URL to open in a new browser window. I tried changing 'parent' to '_blank' but that didn't work.<br /><br />Here is the code:<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><form name="dd_form" target="_blank" id="dd_form"><br />              <select name="Digital Downloads" onChange="MM_jumpMenu('parent',this,0)"><br />                <option value="#" selected>SELECT A STORE</option><br />                <option value="#">_______________</option><br />                <option value="http://www.buy.com/retail/searchResults.aspx?searchquery=Natalie%20Brown&queryType=music_artist&skdbg=12&search_store=6&loc=18250">Buy.com</option><br />                <option value="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?playlistId=4365413">iTunes (Must Be Installed)</option><br />                <option value="http://music.msn.com/search/all/?ss=natalie+brown">MSN Music</option><br />                <option value="http://www.listen.com/">Raphsody (Must Be Installed)</option><br />                <option value="http://www.primetones.com/personalpage.asp?user=nataliebrown">Primetones</option><br />                <option value="http://www.usasounds.com">USA/UK/OZ Sounds (Must Subscribe)</option><br />                <option value="http://musicstore.real.com/music_store/album?artistid=2235&albumid=455783&filter=y&sort=rd&from=disc">Real.com (Must Be Installed)</option><br />                <option value="http://online.musicmatch.com/mmzNav.cgi?params=navigate%3FARTISTID%3D747650%26DEST%3DDownload%26DID%3D">MusicMatch (Must Be Installed)</option><br />                <option value="http://musicstore.connect.com/album/500/000/000/000/000/628/126/500000000000000628126.html?templateid=18-AlbumDetailAMG&pageBusiness=Connect&pageSite=musicstore.connect.com&pageDivision=Regular&pageCommerceType=Purchasable&pageCommerceId=500000000000000628126&pageLocale=en&pageTerritory=US&startRow=1">Sony Connect (Must Be Installed)</option><br />                <option value="http://www.napster.com">Napster (Must Be Installed)</option><br />                                                                      </select><br />            </form><!--c2--></div><!--ec2--><br /><br />The link is:<br /><a href="http://www.natalie-brown.com/ltcb.htm#dd" target="_blank">http://www.natalie-brown.com/ltcb.htm#dd</a><br /><br />Thanks,<br /><br />Nat<!--content-->
I'm not good with these, but does:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><option value="http://wired.com" target="newwin">Wired News</option><!--c2--></div><!--ec2--><br /><br />not work?<!--content-->
Hi Nat.<br />The problem is actually in the javascript function that is called when the selection changes. As written it is specifically telling the 'parent' window to navigate to a new 'location'. Try this:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><script type="text/javascript"><br /><!-- <br />function jumpBlank(selObj) {<br />   eval("window.open('"+selObj.options[selObj.selectedIndex].value+"')");<br />   selObj.selectedIndex=0;<br />}<br />// --><br /></script><br /><br />. . .<br /><br /><select onchange="jumpBlank(this)"><br />   <option value="#" selected>SELECT A STORE</option><br />   <option value="http://music.msn.com/search/all/?ss=natalie+brown">MSN Music</option><br /></select><!--c2--></div><!--ec2--><br /><br />Hope that helps.<!--content-->
Lisa- Jim was right about that previous JS code at the beginning of the HTML. I think your option works for drop down lists tho. Thanks for the line of code.<br /><br />Worked like a charm Jim!<br /><br />Thanks <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> <br /><br /><!--QuoteBegin-btrfld+Jan 9 2005, 08:53 AM--><div class='quotetop'>QUOTE(btrfld @ Jan 9 2005, 08:53 AM)</div><div class='quotemain'><!--QuoteEBegin-->Hi Nat.<br />The problem is actually in the javascript function that is called when the selection changes. As written it is specifically telling the 'parent' window to navigate to a new 'location'. Try this:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><script type="text/javascript"><br /><!-- <br />function jumpBlank(selObj) {<br />   eval("window.open('"+selObj.options[selObj.selectedIndex].value+"')");<br />   selObj.selectedIndex=0;<br />}<br />// --><br /></script><br /><br />. . .<br /><br /><select onchange="jumpBlank(this)"><br />   <option value="#" selected>SELECT A STORE</option><br />   <option value="http://music.msn.com/search/all/?ss=natalie+brown">MSN Music</option><br /></select><!--c2--></div><!--ec2--><br /><br />Hope that helps.<br /><div align="right"><a href="http://www.totalchoicehosting.com/forums/index.php?act=findpost&pid=107133"><img src='http://www.totalchoicehosting.com/forums/style_images/1/post_snapback.gif' alt='*' border='0' /></a></div><!--QuoteEnd--></div><!--QuoteEEnd--><!--content-->
 
Back
Top