Hello,
if you are interested, I have create a javascript control JSControlTags.Autocomplete control, which use prototype.js
and scriptaculous.js. So with prototype.js, the javascript control
has a good design. JSControlsTags is project which give you JSP taglib
which generate javscript control JSControlTags.Autocomplete.
You can see demo at http://jscontrolstags.sourceforge.net/demo/autocomplete/autocomplete-test1.html
and find project at http://jscontrolstags.sourceforge.net/
I want to add a custom event. When visitor selects an item in the autocomplete list, can be worked javascript like alert('Selected') ?
And one more issue,
There are a green apple, a green car, a blue car in my array. When type car green, i want to list a green car, a blue car. Because i use long strings. And visitors can search like that; car green !
Finally !
I got that very same actb (all the original js is completely untouched)
on a reusable, drag and drop, with designer editor support (also for the possible values) server control.
after all the code is OK i think for being a one day prod.
if u are zic you can contact me on email, so that i can send you a sample
and you may update the ariticle for all those ppl having trouble just because of their experience.
the control is already tested for being more than one as well as nested in other user controls, and also inside a nested master pages structure, worked perfectly.
what u get is a control that you can drag fromt the toolbox
once the object is visible in the designer you can edit the size & colors
visually it's exaclty as a TextBox
AND always from the designer grid has the possible values editable using a VS String Collection Editor.
Of Course the possible values is a [string()] array and can be changed also in runtime via the public property Values() of the object.
the 2 lines of JS related to the creation of the array and the bind to the TB
are automatically generated RIGHT @ rendertime.
The only stuff is to add the reference to the basics JSs (actb and common) only once per page, so if you are using a master add the refs to the 2 JSs only there, else in anypage that will use the actb.
if anyone is interested or esceially zic is ready for extending the article providing this server + designer version enchanced my mail is
uno.freeware@gmail.com
again, my work was zero intrusive, it's less' than 80 lines of good server code.no other change introducted.
If zic wwill not provide an extension, this is also meant as an official request for releasing the control on an article of mine.
FINALLY AND AGAIN, MAY ANY GOD BLESS ACTB from ZIC, i have found this one of the most helpful thing on the CP
I am trying to use this script and i have put some print lines in the script to see where it stops. Here is the section of the code
actb_curr = obj;
alert("actb_curr" + actb_curr);
addEvent(actb_curr,"focus",actb_setup);
alert("setup event called");
It prints the first alert like this (actb_curr[object]). But it doesn't print the 2nd alert. Also, i don't see any thing in my page when i start to type in in the text box. Please help.
Here is the code section from my html/jsp file.
ca = new Array('apple','pear','mango','pineapple',
'orange','banana','durian', 'jackfruit','etc');
I've tried actb.js, it worked well. But, where 'tat_tr' is declared and arrowkey moveup and movedown do not work properly. Could you please help and explain more in detail about this? Thanks,
Hi
Can someone help me to implement this in a right to left language?
I tried to replace "left" with "right" but it does not work.
For example there is no offsetRight in javascript.
There are two things that I did not manage with:
1. Put the table in the relevant possition.
2. Align the text in the table to the right.
Hi, I'm using this script and found it very simple to implement. Very nice work!
However I'm using an array of over 1000 elements, and it just doesn't works. As the array will be made from a mySQL table, which will grow and grow, I'd like to know what causes this stop; and, if someone knows, how to get rid of it.
You might have had an issue with some illegal characters. \ , . ' need to be stripped from the data. What seemed to me as a limitation to the number of records actually came down to the unacceptable characters.
For example I had a company called "John's Food Market" which causes issues.
Hope this helps.
Well I find the script very useful but I have a problem. I use several divs, and the list appears behind the other Divs, so I cannot see what it appears on the menu. Is there a way to set the list in top front. With css you can do it with z-index, but how schould I do that with the script?
thank you for your help
I would like to know if it's possible to use this autocomplete feature with an access database instead of an array...Thanks a lot if you have any code for me because I can't find THE solution...
Another flaw in IE6 when using block styles. They hide behind the tag. This has been fixed with IE7, and I have even found work arounds for IE6. Unfortunately, I cannot get those work arounds to work with your script. Great script buy the way.
BTW, your script does work in IE7.
I was wondering if anyone has asked you about this flaw yet and has anyone been able to come up with a fix. Your script is a bit over my head when it comes to tweeking it to fix this issue. Any help would be great.
Thanks,
Kevin
CSS and Javascript that fixed my CSS Menu
#nav li ul { position: absolute; width: 10em; left: -999em; }
#nav li:hover ul { left:auto; }
#nav li:hover ul, #nav li.sfhover ul { left:auto; }
I'm looking for a way to dropdown the list manually (by user pressing arraw down) or by clicking a combobox "down-icon".
Is this possible?
I have tried to change actb_checkkey so that it calls autogenerate when keycode 40 is received and some other small changes but have not been able to get it to work.
Is it possible to bring the drop down box to the top of the page, i.e. there are other controls under the textbox and whenever the list of suggestions comes up it gets hidden by the other controls present on the page. so I need to know, if the list of suggestions(dropdown box) can come above all other controls.