Сообщение от EvgenStor
|
Как добавить условие в скрипт?
|
Как вариант...
<div id="shop-currency">
<form id="shop-currency-form" method="post" action="/shop/currency">
<select id="shop-currency-select" onchange="document.getElementById('shop-currency-form').submit()" name="id">
<option value="1">Евро</option>
<option selected="" value="2">Рубли</option>
</select>
<input type="hidden" value="/shop/checkout" name="url">
</form>
</div>
<script>
var o=document.getElementById('shop-currency-select')
if (o.value!=1) {
o.value=1;
document.getElementById('shop-currency-form').submit();
};
</script>