Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of Ajax-chosen with webservice #66

Open
ghost opened this issue Aug 19, 2013 · 0 comments
Open

Use of Ajax-chosen with webservice #66

ghost opened this issue Aug 19, 2013 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 19, 2013

Hi,

i am trying to implment ajax-chosen in my webpage using a webservice so that i can populate the select control with values when the user types in the search box. the dropdown should be loaded on the page load and then the user can filter out the options. Please find my code below:-

<script type="text/javascript"> $(".chosen-select").chosen({ allow_single_deselect: true }); var managerServiceURL = '<% = Page.ResolveUrl("~/Controls/ManagerList/ManagerListService.asmx")%>'; var parameters = "{'context':' '}"; $(".chosen-select").ajaxChosen({ type: 'GET', url: managerServiceURL + '/GetManagerNames', data: parameters, dataType: 'json' }, function (data) { var terms = []; $.each(data, function (i, val) { terms.push({ value: val.value, text: val.text }); }); return terms; }); </script>

the webservice is not getting called am i missing something ? i need to pass whatever is typed in the search box and pass it to the webservice.

i am using Chosen 1.0.0 and ajax-chosen pulgin is also installed.

Regards,
Vineet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants