Thanks for this article as it worked perfectly in my application..I am using this script in my asp.net(C#) application.I am passing textbox values from my aspx.cs page using function.But when the length of the string values exceeds 700 script is not working..Plz help me..
My code..
(In aspx.cs Page)
Page.ClientScript.RegisterStartupScript(this.GetType(), "PassArray", st.ToString(), true);
where PassArray is the javasript function and st is a
StringBuilder which contains the values
(Javascript function)
function PassArray(incomingArray)
{
try
{
for (var i = 0; i < incomingArray.length; i++)
document.writeln(incomingArray[i]);
//ss=incomingArray;
var obj = actb(document.getElementById('<%=txtCity.ClientID %>'),incomingArray);
return incomingArray;
}
catch(e)
{alert(e)}
}
I am using ajax to update the list used by actb. When listToShow is populated for the first time,
everything works fine. However, when I get a new listToShow from the database using ajax, and
send it to setupFullSiteList again, the mouse click for autocomplete stops working.
Any idea why ?
function setupFullSiteList(listToShow){
var myActb = new actb(document.getElementById("location"), listToShow, true, 1, "location");
}
hi zi chun,
im a coder in html and php and we re starting a website for a comparison of companys... i dont know if we earn money with that site or not but i prefer to ask u in the way: can i use that script u wrote on a commercial website? (because is licened under cc).. or what du u want?
pls give me an answer cause i need it in the next coming days...
Anyone have any ideas on how to set the width for the dropdown to be fixed to my selection box? Also, I'd like to add a border to the dropdown list box, rather than color it. I'm relatively new to JavaScript and while I can do this on a normal div, I'm not there yet if I need to do it via script.
After
function actb_generate(){
if (document.getElementById('tat_table')){ actb_display = false;document.body.removeChild(document.getElementById('tat_table')); }
if (actb_kwcount == 0){
actb_display = false;
return;
}
a = document.createElement('table');
a.cellSpacing='1px';
you can add what you need - example - a.style.width='150px';
Dear Chun,
I can use your actb in html. But I cannot use it in ASP.Net 2.0.
The browser complains "object is needed".How can I use your function in
ASP.Net 2.0. Thanks.
I have to agree with r3kb. The function works very well and the download is nicely self-contained but the code is very difficult to read. May I suggest the following:
- more documentation in the code, the purpose of each function at the
very least,
- friendly variable names,
- use of line spacing where appropriate to help with ease of reading and
- be kind to your fellow developers by avoiding inlines like this:
"if (actb_self.actb_timeOut > 0) actb_toid = setTimeout(function(){actb_mouse_on_list = 0;actb_removedisp();},actb_self.actb_timeOut);"
Thanks for publishing your code!
- Alwyn
P/S: You might want to put your details in the Javascript files so we can give you proper credit.
I like the control quite a bit, but I find that the code it's based on is difficult to read. I would hope that a choice would be made to change to code that self-documents more. Over time, I've learned that commenting every line of code is more distracting than helpful. Code that self-documents uses variable and method names that describe what each is used for. IMNSHO, comments are best used to describe intent, nuances, and challenges. Single letter variables are okay for counters in loops, but it's easier to see what the counter is used for if it's descriptive...
Thanks for the tool and the article. I find it useful already, but I can see that in order to incorporate it into what I'm doing, I'll need to make some changes to it.
Hi ,
Here the requirement is when i type a letter "A" then it will retrive a set of values from database.Then i should use this auto complete instead getting all the values in an array and showing .Could please reply at earliest.
Last Visit: 31-Dec-99 18:00 Last Update: 26-Sep-24 6:05