Re: Accessing a collection from Javascript Event

30 views
Skip to first unread message

RobertTheGrey

unread,
Apr 8, 2013, 3:54:25 PM4/8/13
to spar...@googlegroups.com
Hi Ivaylo,

I'm confused as to why you're enclosing "this.options[this.selectedIndex].value" in quotes. Are you trying to inject a javascript value into the Spark rendering cycle?

Cheers,
Rob

On Monday, April 8, 2013 4:33:33 PM UTC+1, Ivaylo Mateev wrote:
How can I pass the value of this.options[this.selectedIndex].value to the Model in the onChange Method  

<select name="fortbildungen" onChange='document.fortbildungsform.beschreibung.value = "${Model.FortbildungenMitBeschreibung["this.options[this.selectedIndex].value"]}"'>
<for each='var fortbildung in Model.Fortbildungen'>
<option value='${fortbildung.Id.ToString()}'>${fortbildung.Name}</option>
</for>
</select>

-- Ivo
Reply all
Reply to author
Forward
0 new messages