JQuery :: Poll / Voting System - Throw Out The Computer Window
May 29, 2011
I am new to this forum and hope this is in the right place but I have been trying to code (with no success) a voting system with PHP/MySql and jQuery for a clients webpage and am about to throw my computer out the window. I need to create a simple system where a viewer can vote (only one vote) between two options (only 2).
I run a site on tumblr. I know its not as good as wordpress and doesn't allow as many options but I am looking to create a unique voting option for each post. Like an up down vote. Any ideas on how to set this up?
Does anyone know a good example on where to find something that when I click on vote it calculates the results and then shows me horizontal bars to show the percentage for each vote? There will only be two?
I am a graphic designer who has been stuck with creating a voting system for my son's school newspaper website.
Here is what I have so far: [url]
You will see that it is a 1-10 voting system where the user drags the choices into the order of his preference then hits submit. It is working on on a functional level, but I have no idea how to make it work on the backend. I need to somehow accomplish the following:
1. Either get rid of the numbers on the left or somehow stop them from all becoming "1" when dragged.
2. Upon hitting "submit" the votes should be added to a database. I can create a database but I have no idea how to get these numbers into it.
3. The 10 choices will change each week for at least 13 weeks so the database needs to adapt to this.
Here is a zip file with all of the files used on the voting page: [url]
i have a small (LAN only) web server running on my computer, and i would like to be able to make a web page in which i can run a program on the server computer from another compuer. say, for instance, i click a button on the web page running on the server, i want that action to run a .exe on the server. i came up with this code, but it doesn't run it server side, it runs it on the computer with the browser.
I've got a chat program which relies on a column in a MySQL database to see if he/she has logged out or not. But if you close the browser window, the computer still thinks you're online. I wrote this in the JavaScript section cos I think it would definitely need Javascript.
When you active real-time updates, new entries dynamically adding a div. At this stage scroll is automatically moving. This action provides the content you do not miss on visible area.If you want to see this action, you can also watch this screencast; http:[url]....My method;
// Firstly, i am storing the first entry's(in view) positions in window object; jQuery(window).scroll(function() { var q = 0;[code]....
But this is due to flashing. I guess this method is not fast enough
I want to change a db record when the user leave the website. I have this PHP script: <?php require_once("../config.inc.php"); if (isset($_POST["user"]) && isset($_POST["ip_address"])){ $query = 'UPDATE users SET logged = 0 WHEREuser= "' . $_POST["user"] . '" AND ip_address = "' . $_POST["ip_address"] . '" AND confirmed = 1;'; mysql_query($query, DB_LINK); } ?>
And this jQuery script: // script da includere in tutti i file delle pagine per l'utente loggato // cambia lo stato dell'utente da loggato a non-loggato quando viene chiusa la finestra del browser $(window).unload(function(){ $.ajax(AJAX_PATH + "logout.php", {type: "POST", data: "user=" + escape(USER) + "&ip_address=" + escape(IP_ADDRESS), success: function(){alert("Arrivederci!"); return true;}}); }); but it doesn't seem to work.
I've got the following jquery code querying my server, but can't figure out how to Abort the query and reload the page immediately if someone clicks on <a> link. how to abort the current (all) ajax calls if someone clicks on <a> link??
I have a form in which there are two radio buttons .
On selecting the first radio button1 , two textboxes are displayed ( textbox1 & textbox2 ).
& On selecting the second radio button2 only One textbox is
displayed (textbox1) & another one (textbox2) get hidden .
what i am trying to do is that when radio button1 is selected & so two textboxes are displayed, then Onsubmit throw alert for two textboxes seperately , to Enter value in them if this text boxes are blank .
But if radio button2 is selected then throw alert for Entering value for only one text box (textbox1) if its value is blank , & Skip alert throw for the another one hidden textbox(textbox2) .
I call a javascript function b from another function a.
in the function b at certain conditions i want to stop the javascript execution and i have did it by throwing an exception by using Throw New Error('Stopi').
jQuery script I wrote works nicely on one computer, fails on 3 othersManaged to get jQuery datepicker to work nicely with $wpdb.This all seems correct to me:
<li><label for="from">From</label> <input readonly="true" type="text" name="from" id="from" value="Click here to choose!" class="requiredField" style="position: relative; z-index: 100000;" />
I'm trying to load a Javascript file which contains an array of data using .getScript(). It works fine on my server, but the request is never being made when I run it on my own computer, though the callback function is called. Is this an inherent limitation in JQuery/AJAX, or am I doing something stupid? code...
1. Yes you're bad (344567)| 2.No you're good (5676)| Here 5 stars they can rate. the numbers stand for how much people clicked on that option But it is a blog with wordpress system . But every story need there own poll. And i m not a expert in xml or what other system i need to build this.
I am looking for a JavaScript poll/survey script that meets the following criteria:
1) Just a large number of Yes/No questions (at least 20) 2) "Repeat vote-proof" 3) "Display Results" button after survey 4) Results show shortened version of survey question with Y/N tally
If anyone could point me to a reliable script, this would be appreciated.