I am using jQuery autocomplete and I slightly adjusted the autocomplete to also enable people to add things that are not in the database by entering data right into the a textbox. Here is an example of this:
http://www.problemio.com/test.php
The problem I am having is that when a person writes directly into the textbox and presses the add button, the system does not pick up what was written in the textbox. The code I have to get the value of that field is:
var categories = $("#log").text();
Any ideas for how to get the value of the textarea when the add button is pressed if you write in the textarea by hand?
Thanks!!
A textarea is part of a form.
It doesn’t have a text() value, instead it has a val().
var categories = $("#log").val();