Easy question about combo menus

  • BenitoCamelaxxx
  • Newbie
  • Newbie
  • BenitoCamelaxxx
  • Posts: 9

Post 3+ Months Ago

:oops: Hi, I have a simple question. I have a combobox menu and all I want to do is that when I click on any link it opens in a new page instead of on the same page. THis is my code:

Code: [ Select ]
<select class="combobox"
    name="SiteMap" onchange="if(options[selectedIndex].value){location = options[selectedIndex].value}" size="1">
<option selected>-- E-MAIL --</option>
<option value="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
<option value="http://webmail.wanadoo.es">EresMas</option>
<option value="http://www.hotmail.com">Hotmail</option>
<option value="http://www.yahoo.com">Yahoo</option>
</select>
  1. <select class="combobox"
  2.     name="SiteMap" onchange="if(options[selectedIndex].value){location = options[selectedIndex].value}" size="1">
  3. <option selected>-- E-MAIL --</option>
  4. <option value="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
  5. <option value="http://webmail.wanadoo.es">EresMas</option>
  6. <option value="http://www.hotmail.com">Hotmail</option>
  7. <option value="http://www.yahoo.com">Yahoo</option>
  8. </select>


thanx a lot for your help. :D
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • rtm223
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1855
  • Loc: Uk

Post 3+ Months Ago

change:
Code: [ Select ]
location = options[selectedIndex].value


to:
Code: [ Select ]
window.open(options[selectedIndex].value,'window name');


Should do the trick. For more handy info on this go to
http://www.google.com/search?q=new+window+javascript&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8
:wink:
  • BenitoCamelaxxx
  • Newbie
  • Newbie
  • BenitoCamelaxxx
  • Posts: 9

Post 3+ Months Ago

Thanx a lot .. you've answered me really quickly
:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D

I changed what you told me and it's working perfectly!!

Thanx again

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 42 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.