Answer the question
In order to leave comments, you need to log in
js error why?
hello, tell me why an error can fly out, and of course the script does not work
Error: Syntax error, unrecognized expression: unsupported pseudo: icontains
jQuery(document).ready(function(){
{/literal}
// field 1
$('select[name="qs_{$v.depending.caption1}"]').find('option:icontains("{$location_array[$v.depending.caption1]|rawurlencode}")').attr("selected",true);
selDepending(1, 'qs_{$v.depending.caption1}', 'qs_{$v.depending.caption2}', '{$v.depending.id}', {if $multi_depending && in_array($v.dep_id, ','|explode:$multi_depending)}this.form.qs_category.value{else}0{/if}, 0, '', 0, '', '{$live_site}', '' );
// field2
{if in_array($v.depending.caption2, $location_fields) && $location_array[$v.depending.caption2]}
{literal}
setTimeout(function() {{/literal} $('select[name="qs_{$v.depending.caption2}"]').find('option:icontains("{$location_array[$v.depending.caption2]|rawurlencode}")').attr("selected",true);{literal}}, 500);{/literal}
...
<select name="qs_{$v.depending.caption1}" id="qs_{$v.depending.caption1}" {if $multi_depending && in_array($v.dep_id, ','|explode:$multi_depending)}disabled="disabled"{/if} onchange="selDepending(1, 'qs_{$v.depending.caption1}', 'qs_{$v.depending.caption2}', '{$v.depending.id}', {if $multi_depending && in_array($v.dep_id, ','|explode:$multi_depending)}this.form.qs_category.value{else}0{/if}, 0, '', 0, '', '{$live_site}', '' )">
<select disabled='disabled' name="qs_{$v.depending.caption2}" id="qs_{$v.depending.caption2}"
{if $v.depending.no>=3}onchange="selDepending(2, 'qs_{$v.depending.caption2}', 'qs_{$v.depending.caption3}', '{$v.depending.id}', 0, 0, '', 0, '' , '{$live_site}', 'dep_id_qs_{$v.depending.caption1}')"{/if}>
<option value="">{$v.depending.name2}</option>
</select>
.....
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question