This question is locked. New answers and comments are not allowed.
Hi,
I'm using a telerik dropdown to display a list of items, and when selecting one of them I execute a javascript function, so I use the OnChange event as it follows ...
However, in the javascript I would need to compare the old selected value with the new one and I cannot do it as when the function is executed on the OnChange event, the old selected value has been lost and it's not on the markup anymore. Maybe I shouldn't use the OnChange event? Is there any solution?
Thanks in advance
I'm using a telerik dropdown to display a list of items, and when selecting one of them I execute a javascript function, so I use the OnChange event as it follows ...
@(Html.Telerik().DropDownList() .Name("Status" + taxReturn.ID.ToString()) .SelectedIndex(taxReturn.StatusId) .BindTo((SelectList)ViewData["TaxReturnStatusEnum"]) .ClientEvents(events => events.OnChange("onStatusChanged")) .HtmlAttributes(new { data_returnid = taxReturn.ID, style = "Height: 20px; width: 120px" }))However, in the javascript I would need to compare the old selected value with the new one and I cannot do it as when the function is executed on the OnChange event, the old selected value has been lost and it's not on the markup anymore. Maybe I shouldn't use the OnChange event? Is there any solution?
Thanks in advance