On 19 Juni, 17:23, Charlie <charlie...@gmail.com> wrote:
> "according to what's in this list....."
> no way to see from here what's in your list, what you want to look for or 
> what you want to do once you find( or don't find) what you are looking for


I'll try to explain it a bit better.

On the input field, as you type something a list appears with
suggestions which are gotten from a database (via test.php). It's like
a simple autosuggest. You add these items/suggestions to a list (from
where you also can remove them by clicking on them). This works in the
code above, althought I'm not sure I have a good approach.

Now, the rest of the code isn't written since I'm not sure on how to
do this yet. What I want to do with the list is to be able to get
different data from the database, displayed on the same page,
depending on what items that are on this list.

Although it is not what this is, it could be thought of a "add to
cart", with the product info showing in the cart. All on the same
page.

The function listManager() is what adds and removes the items from the
list. It puts a list item to the <ul id="list">. The list becomes
something like this:

<h2>Added</h2>
<ul id="list">
<li><a href="#" id="1" onClick="listManager('delete', '1')">Item 1</
a></li>
<li><a href="#" id="2" onClick="listManager('delete', '2')">Item 2</
a></li>
</ul>

I appreciate any help. Thanks!

Reply via email to