Modify the selected select use is: doc. ParentWindow. ExecScript (' $(" # selRace "). Val (5); ', 'JavaScript');
Below is a net surface source
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
<script>
(function (data, card) {
Utils. Echo (" & lt; Select id='selRace & gt;" );
If (data. RaceList & amp; & Data. RaceList. Length) {
Var selected=data. LandingRaceId | | data. RaceList [0]. Id.
for (var i=0; I & lt; Data. RaceList. Length; I++) {
Var r=data. RaceList [I];
Utils. Echo ([
'& lt; The option value="', r.n umber, '" id="', r.i d, '"',
'data - id="', r.i d, '"',
'data - number="', r.n umber, '"',
'data - forecast="', r.f orecast, '"',
'data - quinella="', r.q uinella, '"',
'data - wp="', truly p, '"',
'data - pid="', r.p id, '" & gt; '
"Show only the first $0 field". The format (r.n umber),
'& lt;/option> ']. Join ("));
If (selected==r.i d) {
Data. LandingRaceNum=r.n umber.
}
}
} else {
Utils. Echo (' & lt; The option value="" selected> No event & lt;/option> ');
}
Utils. Echo (" & lt;/select>" );
$(" # selRace "). Val (data. LandingRaceNum);
}) (_storage_ [' raceList], _storage_ [' card '])
</script>
<script id="tpl_racesSelect" type="text/HTML" & gt;
{if raceList. Length}
{the for r in raceList}
{var tx="show only the first $0". The format (r.n umber)}
Data - number="@ {r.n umber}"
Data - forecast="@ {r.f orecast}"
Data - quinella="@ {r.q uinella}"
Data - wp="@ {p} truly"
Data - pid="@} {r.p id"} {if selected==r.i d selected/{if} & gt; @ {tx} & lt;/option>
{/for}
{else}
{/if}
</script>
& lt;/div>