views:

217

answers:

1

any good ajax samples for implementing voting similar to the up and down buttons of stackoverflow.com

+2  A: 

You create a page for voting like yoursite.com/vote?postid=1234&direction=up that saves the vote in the database. Then you create buttons or links for voting and perform an Ajax request when the user clicks the link:

jquery:

$.post("vote", { postid: the_id, direction: "up" })
Jules
any idea how to do that in GSP pages?
tranced_UT3
I'm sorry, I have never used GSP (I didn't even know it existed).
Jules