Forum Moderators: open

Message Too Old, No Replies

Looking for help with a javascript function

         

BlackRaven

12:43 am on Apr 23, 2007 (gmt 0)

10+ Year Member



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]

JAB Creations

1:33 am on Apr 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My greatest hurdle is how to return a '0' value via javascript that replaces the '1' value.

Uh, I may not know object oriented programming very well but that sounds like voter fraud! :)

- John