Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Grant Reeves9,293 Points
Capturing and updating data in database via ajax without using a form
How would I use ajax to capture data and update the database via another method other than a form?
For instance, I'm trying to allow a user to input a "tag" on a website and click enter to add it to the database.
I don't want to have to use a form w/ a submit button, I want the the enter keypress event to initiate the database insert.
Currently, I'm sending the data via an ajax/jquery $.get method and sending the tag in a query string on the url.
Does my question make sense? If you want an idea of what i'm going for - check out the way evernote handles its tags on notes.
Thats what i'm going for!