AJAX for idiots.
April 5, 2006 3:54 PM
Subscribe
Stupid web development question about updating a database on a mouse click without re-loading the page (AJAX required?)
I've taken it upon myself to learn PHP and MySQL for a very basic website I want to build. Basically, I have a database with a bunch of text entries and I want the site to dump them out based on various sorting or restrictions. Simple enough.
The part I need help with is that I want to give users a way to "rate" each item, so next to each line in the list there is a little thumbs up icon or star or something. I need a way for a user to click on the icon and have it update the "score" of that icon in the MySQL DB without refreshing the page or taking them to a different page. This is probably pretty simple to do, but I don't really know where to begin...Can I do this with pure JavaScript? Any good code templates for this sort of thing? Do I have to learn AJAX-y techniques?
As an example, think about the gMail "star" thing. When you click on the star, it fills in, and nothing else happens. More importantly, that message gets permanently marked as starred. That's what I want to happen!
posted by TunnelArmr to computers & internet (13 comments total)
2 users marked this as a favorite
posted by y6y6y6 at 3:59 PM on April 5, 2006