This is a migrated thread and some comments may be shown as answers.
OnChange Firing when clicking anywhere on pahe
2 Answers 28 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tom
Top achievements
Rank 1
Tom asked on 31 Oct 2011, 09:45 PM
I have a combobox with a client onchange event. The problem is the onchange event is called when I click on anything on the page and not when the combobox is changed.

Any ideas?

2 Answers, 1 is accepted

Sort by
0
Tom
Top achievements
Rank 1
answered on 31 Oct 2011, 10:58 PM
This seem to cause the onchange event to be called befor the change on the combobox happens:

@(Html.Telerik().ScriptRegistrar().Globalization(true).DefaultGroup(group => group.Combined(true).Compress(true)).OnDocumentReady(@<
text
  
       var euid = $("#Ticket_EndUserID").val();
        var combobox = $('#_AutoCompleteEU').data('tComboBox');
        var selectItem = function (dataItem) {
            //dataItem argument is a ComboBox data item.
            return dataItem.Value == euid;
        }
        combobox.fill(function () { //binds the combobox
        combobox.select(selectItem);
        });
        var euid1 = $("#Ticket_ClientCompanyID").val();
          
</text>));
0
Tom
Top achievements
Rank 1
answered on 03 Nov 2011, 03:04 PM
All working now, not sure what I did to fix it.
Tags
ComboBox
Asked by
Tom
Top achievements
Rank 1
Answers by
Tom
Top achievements
Rank 1
Share this question
or