javascript - JQuery: Thumbs up and down rating system? -


I want to apply the rating system above and below the thumb in my web application using jquery Please do me some plug- Indicate these or code how to apply thumbs up and down rating system in your website, please share the link or resources.

Thanks

jQuery

This is a roll-over There is nothing more than the effect, and it knows which database entry is waiting to update. It's not actually jQuery, its "meat" will be your database and server-side scripting.

  $ ("a.voteup"). Click (function () {$ .get ("updatescore.php", {"Id": "112", "Score": "1"}, Function (Response) {/ * Do something with feedback *}} ;});  

This code can be a bit far away, but it is very close to expressing the point. From there, you have a server-side script Getting: Do not use

PHP / MySQL

Important: for display only.
ASP. Net: I had a pre-question Which you are probably working within NAT technologies, the process here will still be equally identical. You will handle the incoming request, the user needs to log in, their score is 1 or -1 , And whatever you want

  session_start (); $ Userid = $ _SESSION ["userid"]; $ vote = $ _GET ["score"]; / * 1 or -1 * / $ article The limit for = $ _GET ["id"]; / * Whatever has been printed here, our 'Jackback' callback function The switch to "response" variable. Ideally, this function will only be allowed to vote if the following are true: 1. The user has not yet voted on this article 2. Score 1 or -1. Voting is enabled on this article 4. User is actually logged in * / Print castVote ($ article, $ vote, $ user id); ? & Gt;  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -