I am trying to make a dropdown list where, when the user clicks the option "more..."it takes them to a URL.
I am using a <select> list, it's for an ecommerce site where the user is selecting the quantity. It goes up to '10', then the last option is 'More...', which is supposed to take them to a product page.
I have googled and tried different things, and they all kinda work, but not how I want them to. What I'm currently using right now:
(note: this is all wrapped in <form> tags). What this does is go to the URL specified by 'value='. Except I only want it to go to a URL when 'More...' is selected. How could I accomplish this?HTML Code:<select name="qty" id="qty" onchange="window.open(this.options[this.selectedIndex].value,'_top')" > <option value="1" selected="selected">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="<?php echo $_product->getProductUrl() ?>">More...</option> </select>



Reply With Quote





Bookmarks