AJAX Poller Script

AJAX Poller Script

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
271 views

Configuration
PHP and mySql required

This script requires that you have PHP installed on your server and access to a mySql database.
Files included in package

* ajax-poller.html = Main HTML file. Contains some HTML code and some PHP code. You will find the code for the poller between the comments

<!-- START OF POLLER -->

and

<!-- END OF POLLER -->

# ajax-poller-cast-vote.php = This file is called by ajax when someone casts a vote. This file updates the database and returns vote results as XML back to ajax-poller.html
# dbConnect.php = File included by ajax-poller and ajax-poller-cast-vote.php. This file connect the scripts to your database
# js/ajax-poller.js = Main Javascript file for this script.
# js/ajax.js = Ajax (SACK library).
# css/ajax-poller.css = Cascading style sheet for the poller
# images/* = images used by the script
# createDbTables.php = Installation file. This file creates the default database tables you need for this script. Just put in connection and data and execute the file in your browser

Installation

This is a step by step guide on how to configure this script

1. Modify dbConnect.php. Insert your dbName, username and password. You may have to create a new database.
2. Edit createDbTables.php. Insert your dbName, username and password and execute the script in your web browser
3. Now, try to open ajax-poller.html in your web browser

Javascript variables

You will find some variables at the top of ajax-poller.js which you could modify:

var serverSideFile = 'ajax-poller-cast-vote-php';
var voteLeftImage = 'images/graph_left_1.gif';
var voteRightImage = 'images/graph_right_1.gif';
var voteCenterImage = 'images/graph_middle_1.gif';

var graphMaxWidth = 120; // It will actually be a little wider than this because of the rounded image at the left and right
var graphMinWidth = 15; // Minimum size of graph
var pollScrollSpeed = 5; // Lower = faster var useCookiesToRememberCastedVotes = true;

* serverSideFile = Path to the PHP file that is called by ajax.
* voteLeftImage, voteRightImage and voteCenterImage = Path to the graph images
* graphMaxWidth = Max width of graph
* graphMinWidth = Min width of graph
* pollScrollSpeed = Speed of animation. Lower value = faster animation
* useCookiesToRememberCastedVotes = If set to true, use cookie to prevent user from casting more than one vote


Demo: http://www.dhtmlgoodies.com/scripts/ajax-poller/ajax-poller.html
Download: http://www.dhtmlgoodies.com/scripts/ajax-poller/ajax-poller.zip
Source: http://www.dhtmlgoodies.com/scripts/ajax-poller/ajax-poller.html

http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/stumbleupon_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/delicious_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/blinklist_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/furl_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/technorati_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/magnolia_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/google_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/myspace_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/facebook_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/sphinn_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/mixx_32.png http://www.ajaxupdates.com/wp-content/plugins/sociofluid/images/twitter_32.png

Related Listings:

  1. Fly To Basket – Ajax Script Fly To Basket – Ajax Script Configuration This is the...
  2. DHTML Window with Tab Support – AJAX Script Configuration You need to include one css file and one...
  3. AJAX Chained Select Script PHP This script requires PHP. You can also other server...
  4. Star Rater Ajax Version Yhis great star rater script made in css. But I...
  5. AjaxMGraph Script For now it has few limitations (only positive numbers, only...

Do you like this post?

Email:     

Tags: , , , , , , , , , , ,

1 Comment »

  1. avatar comment-top

    [...] This post was mentioned on Twitter by Roger, Eyes Drinker. Eyes Drinker said: RT @3gcreations AJAX Poller Script http://bit.ly/v6v9Z [...]

    comment-bottom

RSS feed for comments on this post. TrackBack URL

Leave a comment



Web Design & CSS (Templates) - TOP.ORG