jquery autocomplete plugin dose not work in masterpage

youme

New Member
I,ve been working on a autoparts website where i needed autocomplete functionality in the search box .things i have already tried:i)[ i have tried working with ajax extender using services no luck ]ii)[ i have also tried jquery ui builtin autocomplete plugin no luck]but after one day of full struggle i finally got it working on the simple aspx page but when i use this code in to the masterpage it just dosent work.on this part i need u guys :) \[code\]//code inside the masterpage head<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" type="text/javascript"></script><script src="http://stackoverflow.com/questions/13769660/scripts/jquery.autocomplete.min.js" type="text/javascript"></script><link href="http://stackoverflow.com/questions/13769660/css/jquery.autocomplete.css" rel="stylesheet" type="text/css" /><script type="text/javascript"> $(document).ready(function() { $("#ctl00_myTextBox").autocomplete('select.ashx'); }); </script>\[/code\]//NOTE: this textbox is also in the masterpage not in any contentpage \[code\]<asp:TextBox ID="myTextBox" runat="server" Width="250" ></asp:TextBox>\[/code\]//this is code of httphandler ...//NOTE: i am using LuceneIndexes to retrive the datapublic class select : IHttpHandler {\[code\] public void ProcessRequest(HttpContext context) { context.Response.ContentType = "application/javascript"; if (!String.IsNullOrEmpty(context.Request.QueryString["q"])) { foreach (string s in GetAutoCompleteValues(context.Request.QueryString["q"])) { context.Response.Write(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(s)+Environment.NewLine); } } } public static string[] GetAutoCompleteValues(string prefixText) { DataTable dt = GetSearchList.GetResult(prefixText); List<string> RowNames = new List<string>(); foreach (DataRow drow in dt.Rows) { RowNames.Add(drow[1].ToString() + " " + drow[2].ToString() + " " + drow[3].ToString() + " " + drow[4].ToString() + " " + drow[5].ToString() + " " + drow[6]); } return RowNames.ToArray(); } public bool IsReusable { get { return false; } }}\[/code\]please help me out any suggesstions will be helpful thanx in advance ...
 
Back
Top