jquery autocomplete how to stop page submitting on selection.http://forums.asp.net/t/1798526.aspx/1?jquery+autocomplete+how+to+stop+page+submitting+on+selection+Wed, 02 May 2012 07:55:56 -040017985264958506http://forums.asp.net/p/1798526/4958506.aspx/1?jquery+autocomplete+how+to+stop+page+submitting+on+selection+jquery autocomplete how to stop page submitting on selection. <p>hi ,</p> <p>i am using jquery autocomplete using this http://www.aspsnippets.com/Articles/Using-jQuery-AutoComplete-Plugin-in-ASP.Net.aspx</p> <p>here everthing is fine, only my concern is when i select any item from the list it auto get submit the page</p> <p></p> <p>can any one have idea how i can stop that being submit the page.</p> 2012-04-30T15:32:00-04:004958807http://forums.asp.net/p/1798526/4958807.aspx/1?Re+jquery+autocomplete+how+to+stop+page+submitting+on+selection+Re: jquery autocomplete how to stop page submitting on selection. <p>you need to do something with the select function of autocomplete, for example:</p> <p></p> <pre class="prettyprint">$(&quot;.AutoComp&quot;).autocomplete({ source: function(request, response) { $.ajax({ url: &quot;ServiceURL&quot;, data: JSON.stringify({prefixText:request.term, count:10}), dataType: &quot;json&quot;, type: &quot;POST&quot;, contentType: &quot;application/json; charset=utf-8&quot;, success: function(data) { response($.map(data.d, function (item) { return { label: item.split(':')[0], val: item.split(':')[1] } })) }, error: function(response) { alert(response.responseText); }, failure: function(response) { alert(response.responseText); } }); }, select: function (e, i) { $('#hidResult').val(i.item.val); }, minLength: 1 });</pre> <p><br> Hope that helps,</p> <p>Chris</p> 2012-04-30T18:52:31-04:004959578http://forums.asp.net/p/1798526/4959578.aspx/1?Re+jquery+autocomplete+how+to+stop+page+submitting+on+selection+Re: jquery autocomplete how to stop page submitting on selection. <p>hi thankx for the reply,</p> <p>i am not getting exactly how i can use the above one can you plz help me to get exact code.</p> <p></p> 2012-05-01T09:43:52-04:004959946http://forums.asp.net/p/1798526/4959946.aspx/1?Re+jquery+autocomplete+how+to+stop+page+submitting+on+selection+Re: jquery autocomplete how to stop page submitting on selection. <p>Kirank,</p> <p>I would suggest reading up on the Jquery Autocomplete documentation to understand how everything works.</p> <p>It can be found here:</p> <p><a href="http://jqueryui.com/demos/autocomplete/#default">http://jqueryui.com/demos/autocomplete/#default</a></p> 2012-05-01T13:32:37-04:004960150http://forums.asp.net/p/1798526/4960150.aspx/1?Re+jquery+autocomplete+how+to+stop+page+submitting+on+selection+Re: jquery autocomplete how to stop page submitting on selection. <p>hi , thanx for the reply</p> <p>yes i have allready gone thr with this, and at last i m not able to solve that onselect auto submit page .</p> <p>can any one help me to do so.</p> <p>thankx</p> 2012-05-01T15:21:15-04:004960851http://forums.asp.net/p/1798526/4960851.aspx/1?Re+jquery+autocomplete+how+to+stop+page+submitting+on+selection+Re: jquery autocomplete how to stop page submitting on selection. <p>Hi,</p> <p>You can check multiple implementation of autocomplete here-</p> <p><a href="http://delicious.com/anupdg/autocomplete">http://delicious.com/anupdg/autocomplete</a></p> 2012-05-02T05:21:59-04:004961134http://forums.asp.net/p/1798526/4961134.aspx/1?Re+jquery+autocomplete+how+to+stop+page+submitting+on+selection+Re: jquery autocomplete how to stop page submitting on selection. <p>Hi kirank28,</p> <p>Do you mean the autocomplete sample of <a href="http://www.aspsnippets.com/Articles/Using-jQuery-AutoComplete-Plugin-in-ASP.Net.aspx"> http://www.aspsnippets.com/Articles/Using-jQuery-AutoComplete-Plugin-in-ASP.Net.aspx</a> will auto submit page after select any item?</p> <p>the sample in that link is simple&nbsp;below&nbsp;and there is no submit action on select function,</p> <pre class="prettyprint">&lt;script type=&quot;text/javascript&quot;&gt; $(document).ready(function() { $(&quot;#&lt;TextBoxControlId&gt;&quot;).autocomplete('&lt;Url of handler&gt;'); }); &lt;/script&gt;</pre> <p>&nbsp;if you want to do something with the select function of autocomplete, try the method <a title="Wozer" href="/members/Wozer.aspx">Wozer</a>&nbsp;suggested.</p> <pre class="prettyprint"> &#36;(".AutoComp").autocomplete({ source: function(request, response) { ... }, select: function (e, i) { //change the code to implement your requirement here } });</pre> <p>If this can not solve your problem, please explain your situation in more detail for anyone to help you. Thanks.</p> <p>&nbsp;</p> <p>&nbsp;</p> 2012-05-02T07:55:56-04:00