Jump to content

How do I go about making a clickable rater like mixx.com


Redlightpacket

Recommended Posts

This is more of a PHP (or server-side) question than a JavaScript question. You can write all the javascript you want and you are not going to have those votes saved and displayed to other users or to the same user on different visits.

 

The client-side functionality is made up of simple FORMs with a single button and hidden field that get submitted to the server where the data is saved.

	<div class="vote-widget">
<div class="vote-count">13<span> votes</span></div>
<div class="vote-actions">
	<form action="http://www.mixx.com/vote/for/2011901" class="vote-for" method="post">
		<input type="hidden" name="collection" value="1" />
		<button type="submit" class="submit" title="Vote for"><span class="alt">Vote for</span></button>
	</form>
	<form action="http://www.mixx.com/vote/against/2011901" class="vote-against" method="post">
		<input type="hidden" name="collection" value="1" />
		<button type="submit" class="submit" title="Vote against"><span class="alt">Vote against</span></button>
	</form>
</div>
        </div>

 

The site then uses CSS to make those buttons appear as images. I don't see any javascript involved.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.