I am looking for help in creating a javascript function (uservote) that is activated with the onclick event. I am creating a similiar system like reddit in which users can vote on various posts. However my question is how to create a function that takes the following values and then sends them to the php script (voting.php) via POST method. My greatest hurdle is how to return a '0' value via javascript that replaces the '1' value. This is to show that the user has already voted and if the users clicks again it is to represent the user wants to remove his/her vote.
javascript:uservote(2611482, 1, 755110727672d58218e89b16bd45ddb808814b5b)
[edited by: BlackRaven at 12:44 am (utc) on April 23, 2007]