This is a migrated thread and some comments may be shown as answers.

Problems Binding AutoComplete to 'onfocus' Event

3 Answers 334 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
Donald
Top achievements
Rank 1
Donald asked on 05 Jan 2012, 12:31 PM
Hi,

The following code to do something when AutoComplete receives focus is not triggering the function specified when AutoComplete receives focus:

            function window_onload() {
                //pageLoad();
                document.getElementById("imgAjax").style.display = "none";
                window.focus();
                 
                $(document).ready(function() {
                    $("#go_autoCompleteInput").kendoAutoComplete({
                        separator: "  ",
                        minLength: 3,
                        dataTextField: "value",
 
 
.... othere code
 
                });
 
                go_autoCompleteInput = $("#autoCompleteInput").data("kendoAutoComplete")
 
            };
 
            function _autoCompleteInput_onfocus() {
                alert("'autoCompleteInput' 'onfocus' event just started executing.");
                go_CheckBoxContentAreaEnabled.checked = false;
            }

Can you tell me what I am doing wrong?

many Thanks,

Donald



3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 05 Jan 2012, 06:37 PM
Hi,

I don't see any code which attaches the _autoCompleteInput_onfocus function to the focus event of the dom element. Did you miss to include that code?

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Donald
Top achievements
Rank 1
answered on 05 Jan 2012, 10:44 PM
Hi Atanas,

Thanks for the feedback.  It worked when I removed the ' bind'.to the Autocomplete and added a normal "onfoucs' event handled to the input elemetn.

One of the things that's not clear to me about AutoComplete from its documentation is whether some action should be attached to the AutoComplete or to the Input element that it overlays.

Thanks,

Donald
0
Georgi Krustev
Telerik team
answered on 06 Jan 2012, 12:25 PM
Hello Donald,

 
Could you please elaborate more on the required functionality? A sample test project will be of a great help. Could you explain the last sentance - "One of the things that's not clear to me about AutoComplete from its documentation is whether some action should be attached to the AutoComplete or to the Input element that it overlays." ?

Regards,
Georgi Krustev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
AutoComplete
Asked by
Donald
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Donald
Top achievements
Rank 1
Georgi Krustev
Telerik team
Share this question
or