the sample in that link is simple below and there is no submit action on select function,
<script type="text/javascript">
$(document).ready(function() {
$("#<TextBoxControlId>").autocomplete('<Url of handler>');
});
</script>
if you want to do something with the select function of autocomplete, try the method Wozer suggested.
$(".AutoComp").autocomplete({
source: function(request, response) {
...
},
select: function (e, i) {
//change the code to implement your requirement here
}
});
If this can not solve your problem, please explain your situation in more detail for anyone to help you. Thanks.
Please mark the replies as answers if they help or unmark if not.
Feedback to us
Yanping Wang...
Star
14919 Points
1537 Posts
Microsoft
Re: jquery autocomplete how to stop page submitting on selection.
May 02, 2012 07:55 AM|LINK
Hi kirank28,
Do you mean the autocomplete sample of http://www.aspsnippets.com/Articles/Using-jQuery-AutoComplete-Plugin-in-ASP.Net.aspx will auto submit page after select any item?
the sample in that link is simple below and there is no submit action on select function,
<script type="text/javascript"> $(document).ready(function() { $("#<TextBoxControlId>").autocomplete('<Url of handler>'); }); </script>if you want to do something with the select function of autocomplete, try the method Wozer suggested.
$(".AutoComp").autocomplete({ source: function(request, response) { ... }, select: function (e, i) { //change the code to implement your requirement here } });If this can not solve your problem, please explain your situation in more detail for anyone to help you. Thanks.
Feedback to us
Develop and promote your apps in Windows Store