...

View Full Version : Opening This Combo box link in new window



Danyl
10-19-2006, 03:24 PM
Ok here is the thing I am using this javascript to add items to our customers shopping cart, and the page that it is displayed on is an Iframe and I need these links to open in a new window.




<form name="linkform">
<select name="links" size="1">
<option value="http://ww6.aitsafe.com/cf/add.cfm?userid=82169076&product=test1&price=1&hash=9328533fa3a386472a62e92c068c6391" >test1</option>
<option value="http://ww6.aitsafe.com/cf/add.cfm?userid=82169076&product=test2&price=2&hash=ea3084417d5484cb56f7061254c1faf4" >test2</option>
<option value="http://ww6.aitsafe.com/cf/add.cfm?userid=82169076&product=test3&price=3&hash=27b5e331e43756a37f28b36d6f00705b" >test3</option>
<option value="http://ww6.aitsafe.com/cf/add.cfm?userid=82169076&product=test4&price=4&hash=a2babf4a334d64cfc06954feece2485e" >test4</option>

</select>

<script language="javascript">
<!--



function openWindow()

{
location=
document.linkform.links.options[document.linkform.links.selectedIndex].value

}
//-->
</script>
<a href="JavaScript:openWindow()">
<img src="images/buynow_button.gif" border=0 width="100" height="32"></a>
</form>


But I cant seem to get a grasp on how to get it to open in a new window, if anyone can help that would be great.

Thank You,
Danyl

A1ien51
10-19-2006, 03:35 PM
have you tried to use window.open(TheUrlHere)?

Eric

Danyl
10-19-2006, 03:50 PM
how would I get each link on my drop down box to go to there desinated location?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum