...

View Full Version : Container/Dropdown for an AJAX Query



izecul
01-10-2011, 01:34 PM
How do I make the dropdowns for an AJAX input field? I have the Javascript and PHP part working, but I have no clue how to format a container for the AJAX results.

Arnaud
01-10-2011, 02:06 PM
Posting your working code might help. I don't even understand what you're talking about. Are you trying to populate a dropdown-list with AJAX? Or call an ajax function from the contents of your dropdown list?

izecul
01-10-2011, 06:14 PM
I have a form where I trigger an AJAX event. I have the handler which returns a comma-separated string. I'll break up this string (for example, "arrow,arrowhead,arrears") into three separate lines
arrow
arrowhead
arrears.

And I need to put these results within a container under my input textbox, so that it looks like a dropdown.

My question is, how do I create such a container? Is it CSS (in which case, what are the properties or attributes) or a Javascript code?

Arnaud
01-10-2011, 08:33 PM
And I need to put these results within a container under my input textbox, so that it looks like a dropdown.


Sorry, this is the part where I get lost...

What do you mean by container? A div ? I don't get it...
What I understand from your post is that you want to convert a coma separated list returned by your ajax call to a "line-return" separated list?

like... convert all comas to <br> and display that somewhere in a div?

izecul
01-10-2011, 09:11 PM
An autocomplete field... whose suggestions are derived as an AJAX response



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum