But did you put the newly built javascriptarray string into the HTML like this:
<input type="text" name="pdfDesc" id="pdfDesc" autocomplete="off" /><br />
<script><br />
customarray = new Array(<%=javascriptArrayValues%>);<br />
actb(document.getElementById("pdfDesc"),customarray);<br />
</script>code><br />
<br />
So the Text box above will be bound the js asin the original example, but instead of hardcoding the array values, just drop in the variable name.
Could someone help me achieve this using ASP.NET vs ASP and VBscript? I want the same results (sql populated array) but am too inexperienced to figure out how .
I really like your ACTB script. I use it instead of DevExpress comboboxes everywhere now. MUCH faster
I'm working on an in-house project(not for sale or anything) and would like to know if its okay to use in the application? In documentation I have put credit for this script to this article.
Hi
Is there any way to submit the form automatically when inserting a valu from the list by mouse click?(i.e without the need to press enter)
Thanks
Rajesh
With the large number of 27000 words, i got the problem, that it tooks a lot time (aprox. 60 seconds) to display the website.
The autocomplete works with the 27000 entries. (Not fast, but it works!)
How can i reduce the time loading the website? Any trick?
(The words are from a MySQL-server)
-- modified at 3:32 Tuesday 20th November, 2007
I have solved the problem!
By changing the source from MySQL to a plain ASCII-File the time is very fast. (max. 3 seconds)
Your register starup script will look something like mine which pulls from a LINQ Query...
(yes I know lists are slow )
<br />
List<string> someList = (from s in DC.Table select s.FieldIwant).Distinct().OrderBy(s=>s).ToList();<br />
/*^^^--- Get your data into this List or Object any way you want, but fetch the data in the codebehind Page_Load*/<br />
<br />
//Setup stringbuilder<br />
System.Text.StringBuilder sbList = new System.Text.StringBuilder();<br />
/serialize someList<br />
jss.Serialize(someList, sbList);<br />
//create startup script string<br />string startupScript = "FillAutoComplete('" + sbList.ToString() + "');";<br />
//pass to clientscript manager<br />
cs.RegisterStartupScript(this.GetType(), "FillComboBoxes", startupScript, true);<br />
</string>
I am integrating the ACTB in my application. It works perfectly fine except for one thing. My we page has select boxes just below the text boxes. Now, when I enter some characters and the auto complete div list comes, it gets hidden on the places wherever the select box is. Can you please suggest me what should I do or is there any fix available for that? If not then when the fix for this will be available.
This is a problem in IE6 where select lists appear above all other elements. I have seen implementations where frames have been put behind the autocomplete to cover the select list but I have not seen any versions of this autocomplete which do this.
Any update on a fix for this at all as it is a major roadblock?
I am having the same problem in IE6 but hope to have it sorted with the following functions which normally do the job for other popups that I have. You just need to run the respective function from the show/hide triggers of your popups.
function hideDrops() {
var drops = document.getElementsByTagName('select');
for (i = 0; i < drops.length; i++) {
drops[i].style.display = 'none';
}
}
function showDrops() {
var drops = document.getElementsByTagName('select');
for (i = 0; i < drops.length; i++) {
drops[i].style.display = 'none';
}
}
You can of course be more specific as to which Tags/Divs etc you wish to show/hide by using document.getElementById('your_element_id')
Now where will those triggers be in the auto-complete code?
Edit:
This worked for me! Assuming you have also entered the above mentioned functions too.
After Line:163> actb_display = true;
type> hideDrops();
After Line:365> actb_display = false;
type> showDrops();
After Line:381> actb_display = 0;
type> showDrops();
Hi I used the actb control (v1.31) for a text area. Once text area has some (multiple line) text, up and down arrow keys cant be used to move up down in text area. Only left and right arrow keys work.
For a text area user do need to be able to browse using all arrow keys to edit existing content.
I’m investigating your code and it seems really good!!.
I wander if you can help me to do this task,
I have to auto complete e-mail, so what I want is after the user type “@ “ show a list of possible e-mail list.
Is it possible to do with your code??
Suppose this, I have entered in the array this code..
var customarray=new Array('hotmail.com','yahoo.com');
What I want this :
When the user type martin@hot--> apperars in the windows “ hotmail.com”, then the user select the correct option and then add his selection to the userEmnail
Ex martin@hot
add martin@hotmail.com
Appears hotmail.com
Thanks
Last Visit: 31-Dec-99 18:00 Last Update: 24-Sep-24 16:46