Solved

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

Posted on 2014-01-29
2
223 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
2 Comments
 
LVL 6

Accepted Solution

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

Author Comment

by:brucegust
Comment Utility
Perfect!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now