onchange="window.location.href=this.options[this.selectedIndex].value"
Чтоб при выборе свойства не перезагружалась страница, после нажатие кнопки Показать, сортировался товар?
Код: Выделить всё
{if $features}
<form method="GET" enctype="multipart/form-data" >
<table id="features">
{foreach $features as $key=>$f}
<tr>
<td class="feature_name">
{$f->name}:
</td>
<td>
<select class="c-input feature_values" size="1" data-feature="{$f->id}" onchange="window.location.href=this.options[this.selectedIndex].value">
<option onchange="window.location.href='{furl params=[$f->url=>null, page=>null]}'">Выбрать</option>
{foreach $f->options as $o}
<option value="{furl params=[$f->url=>$o->translit, page=>null]}" type="selected" {if $smarty.get.{$f@key} && in_array($o->translit,$smarty.get.{$f@key})}selected{/if}>{$o->value|escape}</option>
<span class="c-indicator"></span>
{$o->value|escape}
{/foreach}
</select>
</td>
</tr>
{/foreach}
</table>
<input type="submit" value="Показать" >
</form>
{/if}
Код: Выделить всё
{literal}
<script>
function clicker(that) {
var pick = that.options[that.selectedIndex].value;
location.href = pick;
}
function clickerb() {
var pick = getElementsByName("window.location.href=this.options[this.selectedIndex].value").options[getElementsByName("window.location.href=this.options[this.selectedIndex].value").selectedIndex].value;
}
</script>
{/literal}