This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes [JS] strange problem of array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "[JS] strange problem of array" Watch "[JS] strange problem of array" New topic
Author

[JS] strange problem of array

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Following code is with reference to actb:



'a' is textbox which displays suggestions from an array ('customarray' or 'matchingNames'), this script code is written in actb() function (no issue here).

The strange part is, it gives suggestions from 'customarray' but doesn't gives suggestions from 'matchingNames' array which I am building run time through Ajax...

Please help.
Thanks.
[ November 24, 2006: Message edited by: Bear Bibeault ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Maybe it does not work because you hacked Ajax into code that does not have Ajax in it?

Look at the Yahoo Autocomplete API

Eric
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Originally posted by Eric Pascarello:
Maybe it does not work because you hacked Ajax into code that does not have Ajax in it?

Eric


... but before this line 'var obj = actb(document.getElementById('a'), customarray);' ajax is finished, now it's just javascript...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: [JS] strange problem of array
 
Similar Threads
jquery -- code review comparing original and current values on a form
AJAX implementation is giving problem
[Ajax] response time is very-very slow
Refresh Modal Dialog?
How to pass an array as parameter to a script