Forum Moderators: open
<FORM name="quantityform1" target="_blank">
<SELECT name="productquantity">
<OPTION SELECTED value="http://www.mysite.com/Merchant2/merchant.mvc?Screen=BASK&Store_Code=ABC&Action=ADPR&Product_Code=4-21402&Attributes=Yes&Quantity=1" target="blank"> 1
<OPTION value="http://www.mysite.com/Merchant2/merchant.mvc?Screen=BASK&Store_Code=ABC&Action=ADPR&Product_Code=4-21402&Attributes=Yes&Quantity=2">2
</SELECT>
<INPUT type="button" name="go" value="Add To Cart" STYLE="font-family:Times New Roman, Times, serif; font-size:14;
font-weight: bold; background:#f2f2f2; color:#ff0000; width:80; border:none" onClick="window.location=document.quantityform.productquantity.options[document.quantityform.productquantity.selectedIndex].value">
</FORM>
I can't make it go to a blank window using target="_blank" in the form tag, in the html name or in the button input field. I'm not great at javascript obviously. Can anyone tell me how to change the onClick to make it go to a blank window? Much Thanks, AMc
I tried changing window.location to window.open and since it didn't work, I guess the window.open needs different parameters. My objective is to allow a site visitor to choose 1 or 2, click the button, and be taken to a new window containing the url page associated with either 1 or 2, based on what they chose.
I found the basis for this window.location code online and it neatly does the trick, except that as you say, I must need window.open to get the new window. I just don't know how to rewrite the onclick to make it work.
Thanks,