Is it possible to send selected options with javascript to the url ? In my case it seems to be the only solution. My code is very basic. My problem is also, that i have to handle smarty (i hate smarty)
{block name="frontend_detail_buy"}
<select name="lieferperiode" id="lieferperiode">
<option value="{$sArticle.ordernumber|replace:"a":"a"}">jede Woche</option>
<option value="{$sArticle.ordernumber|replace:"a":"b"}">alle 2 Woche</option>
<option value="{$sArticle.ordernumber|replace:"a":"c"}">alle 3 Woche</option>
<option value="{$sArticle.ordernumber|replace:"a":"d"}">jeden Monat</option>
</select>
<select name="menge" id="menge">
<option value="1">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>
</select>
<script type="text/javascript">
var lieferung = document.getElementById("lieferperiode");
var periode = lieferung.options[lieferung.selectedIndex].value;
var mengen = document.getElementById("menge");
var anzahl = mengen.options[mengen.selectedIndex].value;
var link = "http://XXXXX.de/XXXXX.php/sViewport,checkout/sAction,addArticle/sAdd," + periode + "/sQuantity," + anzahl;
{/block}
As you can see, the link contains 2 vars that are changeable via the dropdown menu. i made a test with alert and document.write and it is always giving me error var link is undefined. what am i doing wrong guys? cheers