Solved

How do I make these options open up in new browser?

Posted on 2014-01-29
2
232 Views
Last Modified: 2014-01-29
Here's my code:

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

...and here's the HTML:

      <select name="select154" size="1" onchange="MM_jumpMenu('top',this,1)">                  <option value="#" selected>MyTen BI Pages</option>                                    
      <option value="https://mytenbi.symbion.com/dashboard/main.php">MyTen BI Page</option>                                                
            <option value="">_____________________</option>
            </select>

Works great, but every page opens up in the same window. I need the equivalent to target="_blank."

How?
0
Comment
Question by:brucegust
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
Patrick Tallarico earned 500 total points
ID: 39818431
Instead of eval(...)
 try
window.open(selObj.options[selObj.selectedIndex].value, "_blank");
0
 

Author Comment

by:brucegust
ID: 39818661
Perfect!
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question