how to concatinate a link with <select> <option> value on "onchange" event
- by atif
<?php echo $this->getUrl(); ?> = this gives me my index page url .i.e. www.domain.com/index.php/
but now wat i want is when any particular option is selected, it should add to this url.
.e.g.
www.domain.com/index.php/wordpress/
i write this code for it but now don know how to get it done :(
<select onchange="setLocation('<?php echo $this->getUrl(); ?>')">
<option value=""> </option>
<option value="wordpress">Wordpress</option>
<option value="drupal">drupal</option>
<option value="magento">Megento</option>
</select>
also i had searched this link but couldn't take help from it. As it didnt work for me.
<select name="forma" ONCHANGE="location = this.options[this.selectedIndex].value;">
<option value="Home">Home</option>
<option value="Contact">Contact</option>
<option value="Sitemap">Sitemap</option>
</select>