|
"Stable" doesn't support key/value pairs at all, so you can safely use commas in items (I think).
My previous comment was related to the "beta" release, yes.
P.S. Sorry for inconvenience - "beta" is quite mature, so you're quite safe to use it.
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
|
|
|
|
|
Ok
I'm using beta now, and made the change you suggested.
Some, not all, of the entries in the list show both item and value, while others only show item.
The ones that show item and value are displayed like this:
AEROTECH;AEROTECH
For the sake of sanity, here is the full list generated for the xml doc:
<listdata>AENON CONSULTANTS, LTD;AENON|AEROTECH;AEROTECH|ALTERNATIVES IN ENGINEERING, INC.;ALTERNATI|APACHE JUNCTION LANDFILL;APACHE|APPLIED ENGINEERING SERVICES, LTD;APPLIEDEN|ARC DESIGN RESOURCES, INC.;ARC|ARCHAEOLOGICAL RESEARCH, INC.;ARCHAEOLO|AUTOMATED PLATTING INC.;AUTOMATED|BROWN DESIGN GROUP;BDG|C.S. DRILLING INC.;CSDRILL|CAPITAL ENGINEERING;CAPITALEN|CARDINAL STRUCTURAL DESIGN, INC.;CARDINALS|CARTER & BURGESS;CB|CHRISTOPHER BURKE ENGINEERING, LTD;CHRISENG|CLARK DIETZ, INC;CLARKDIET|COOPER AERIAL SURVEYS CO.;COOPER|CRAWFORD, MURPHY &TILLY, INC.;CRAWFORD|DESIERTO VERDE;DESIERTO|DEWBERRY & DAVIS LLC;DEWBERRY|ECO-ENGINEERING SOLUTIONS, LLC;EES|ENCAP, INC;ENCAP|ENGINEERING AND ENVIRONMENTAL;ENGENV|ENVIRONMENTAL SCIENCE CORP.;ESC|GEO-TECHNOLOGIES, INC.;GEOTECH|GEOCON CONSULTANTS, INC.;GEOCON|GEWALT HAMILTON ASSOC., INC.;GEWALT|GRUMMAN BUTKUS ASSOCIATES;GBA|H.H. HOLMES TESTING LAB., INC.;HHHOLMES|HAEGER ENGINEERING LLC;HAEGER|HEY AND ASSOCIATES INC.;HEYASSOC|HIGHLAND ENGINEERING;HIGHLANDE|HINES IRRIGATION CONSULTANTS, INC.;HINES|HUFF & HUFF, INC.;HUFF|INNERSPACE ENVIRONMENTAL ASSESSMENT;INNERSPAC|JFNEW;JFNEW|KEELEY CONSTRUCTION, INC.;KEELEY|KENIG, LINDGREN,O'HARA, ABOONA, INC;KENIGLEND|KUDRNA & ASSOCIATES, LTD;KUDRNA|LAND STRATGIES, INC.;LANDSTRAT|LANDSCAPE ARCHITECTS;LANDSCAPE|LSC TRANSPORTATION CONSULTANTS, INC;LSC|LUMOS AND ASSOCIATES, INC.;LUMOS|METRO TRANSPORTATION GROUP, INC.;METROTRAN|MILLER BROOKS ENVIRONMENTAL, INC.;MBE|PAUL R. GLENN ARCHITECTS, INC.;PAULRGLEN|PROFESSIONAL SERVICE INDUSTRIES, IN;PSI|R2T INC.;R2T|SABNEKAR CONSULTING, LLC;SABNEKAR|SEWER SYSTEM EVALUATIONS, INC.;SSE|SOLAEGUI ENGINEERS;SOLAEGUI|SPECIALIZED SERVICES COMPANY;SSC|SPENCER B. GROSS, INC.;SPENCER|STREET SMARTS;STREETSMA|STRUCTURES UNLIMITED, P.C.;STRUCTURE|STS CONSULTANTS, LTD;STS|TASK ENGINEERING CO INC;TASKENGIN|TERRACON CONSULTANTS INC;TERRACON|TIERRA ECOLOGICAL CONSULTANTS;TIERRAECO|TOBEY-WADE CONSULTING;TOBEY|TRANSPORTATION STRATEGIES, LTD;TRANSPORT|YELLOW JACKET DRILLING;YELLOW|
|
|
|
|
|
My bad. You should change not only the line
var ca = obj.actb_keywords[i], comma = ca.indexOf(",");
, but also the line which is 3 lines below it:
var ci = ca.split(',');
(change comma to semicolon)
- Dmitry.
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
|
|
|
|
|
Perfect! Thanks Dmitri
|
|
|
|
|
in using Firefox, the autosuggest works perfectly.
IE however, does absolutely nothing.
When using in IE 6, placing a window alert within the main actb function, yields nothing.
(Firefox displays this, as well as alert(http.responseText);, suggested in an earlier post)
If I place the alert above the function (under the 'var image' code) I see the alert.
The code within the parent page I am using to initiate the actb class is as follows:
new actb('bst_db_consultant_idx', '', 'req_subConsultantAutoLoadList.php?page=contractsproposals&subpage=request&');
The XML created by req_subConsultantAutoLoadList.php is valid.
Where am I going wrong?
|
|
|
|
|
Hi,
1) Do you place the "new actb(..." statement after the bound INPUT element has loaded? (you should place the SCRIPT element after the INPUT, or in the BODY's onload handler)?
2) Does MS IE show any errors in the status bar?
- Dmitry.
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
|
|
|
|
|
1) The js code "new actb(..." is placed after the input.
2) There are no javascript errors show in IE, as well as no errors or warnings displayed in firebug (firefox)
|
|
|
|
|
Strange. Does the sample that is bundled with article work for you in MS IE?
By the way - where exactly you place the 'alert' in the body of actb? I'd suggest placing them in several places of the constructor function to see if the actb object gets correctly initialized.
- Dmitry.
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
|
|
|
|
|
I will try the sample and respond.
I placed the alert is multiple places and in IE it only works if it is placed above the construct function.
Also - Thank you so much for responding as quickly as you have - it is truly appreciated.
|
|
|
|
|
Yes - the example code works fine in IE
|
|
|
|
|
patrick mcgovern wrote: Yes - the example code works fine in IE
Then there are 2 ways to debug this:
1. Try to put "new actb (..." statements not in the HTML code, but in the onload handler of BODY element.
2. In autosuggest.js, place alerts in "actb" function in every gap (i.e. between code blocks - you'll see), so you can see if any one fires.
(I believe the very 1st alert - placed right after the "function actb(...){" statement should fire - because there is surely nothing erroneous)
- Dmitry.
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
|
|
|
|
|
Progress!!!
I placed the new actb.. statement in the body onload and I am now recieving the following js error in IE when the page loads:
Line 111
Char 3
Error: 'this.actb_curr.actb' is null or not an object
Code: 0
This is most likely occurring because the element that has the auto-suggest resides within a script that is loaded via an ajax call (it populates the contents of a div).
The alerts within the construct function of autosuggest.js are working now, though.
|
|
|
|
|
patrick mcgovern wrote:
Line 111
Char 3
Error: 'this.actb_curr.actb' is null or not an object
Code: 0
Yes, this is because by the time of "new actb(..." call, your INPUT element is unaccessable by id (i.e. it isn't loaded into page's DOM).
What you should do in your case, is call "new actb(..." when INPUT elements finishes loading (in XMLHTTPRequest's "onload" handler, usually).
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
|
|
|
|
|
I just got a lot of strange looks from my coworkers because I SCREAMED IN EXCITEMENT.
It works!!!
Thank you so much, Dmitry. Were I a little closer to the Russian Federation, I'd bring a keg of the most volitile beer I could find to your house.
I can't thank you enough - You have been an amazing help.
Thank you thank you thank you
-=Patrick=-
|
|
|
|
|
You're welcome
patrick mcgovern wrote: Were I a little closer to the Russian Federation, I'd bring a keg of the most volitile beer I could find to your house.
Because you're not in Russia can I please ask you to vote for the article, please?
Thank you much in advance,
- Dmitry.
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
|
|
|
|
|
I voted, but it only went up to 5 - where's the option for 100,000,000,000?
|
|
|
|
|
Thanks
There will be a new release soon - in about a week, so you may want to bookmark the article.
Best regards,
- Dmitry.
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
|
|
|
|
|
Ok - one more (small) issue.
When the auto suggest box appears, other select boxes in the form show above the suggest list.
Is there a way to set the z-index of the suggest list so it's always on top?
|
|
|
|
|
Please look at the "actb_useIFrame" parameter in the actb function definition - this should help (set it to true ).
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
|
|
|
|
|
|
sorry, i don´t know a lot of javascript.
the control works fine, but i cant get the correct index of the selected item.
what i do is:
<input type='text'
style='font-family:verdana;width:300px;font-size:12px'
id='tb' value='' onclick=window.alert(actb.actb_selectedIndex) />
example:
customarray = new Array('apple','appleee','mango','mangoo','mangooo' ,'orange');
if i select mango the return value is 0 (and i want 2)
if i select mangoo the return value is 1 (and i want 3)
if i select orange the return value is 0 (and i want 6)
what i´m doing wrong???
thanks for your help
|
|
|
|
|
Hi,
please use not actb.actb_selectedIndex, but (actb.actb_pos - 1). actb_selectedIndex behaves very strange, I'll fix it soon.
- Dmitry.
Listen up! "Teamwork" means staying out of my way! (Seifer, Final Fantasy 8).
|
|
|
|
|
I have an auto-suggest scrollbar in a window that itself has a scrollbar. The auto-suggest scrollbar works just fine when the outer scrollbar is at top position. However, if the outer scrollbar is scrolled down, the auto-suggest scrollbar collapses when I try to use it (i.e. the auto-suggest scrollbar appears but when I click it, it collapses).
Do anyone recognise this problem? The problem arise in IE. In Firefox the auto-suggest scrollbar work fine even when the outer scrollbar is scrolled down.
Thanks a lot!
/Josefin
|
|
|
|
|
First off, excellent work!
I had a question about one thing, though, something that may be related to a previous post. For some reason in FireFox3, the autosuggest will not grab all of the XML values despite changing this.actb_fullRefresh = true; in the js file.
It works flawlessly in IE7 though. Any suggestions?
|
|
|
|
|
This article and code is really nice, fastidious work. I'm very impressed.
My question is why are you using the setTimeout functions? I noticed that you had the default switch set the tocomplete call to .5 seconds. This is a considerable amount of time and can be disruptive to the user experience. However, all the other calls are set to .025 seconds. It looks like you've corrected (or revised) this problem in your next beta release. I just wondered the thought process, though.
Thanks.
|
|
|
|
|