• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

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

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
brucegust
Asked:
brucegust
1 Solution
 
Patrick TallaricoFSEP Systems AnalystCommented:
Instead of eval(...)
 try
window.open(selObj.options[selObj.selectedIndex].value, "_blank");
0
 
brucegustPHP DeveloperAuthor Commented:
Perfect!
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now