I have followed all the fixes on the forum and still can't get things working. I have included the script on my site and can see everything. i.e... polling options and the vote button. When I click on the vote button nothing happens. I get this: http://localhost/hyipcharts/index.php#
I am running on a local server (wamp) and have everything set up correctly. The tables are set and working. I think it is the castmyvote function, but not sure. Here is the code:
<?php
// Place this into your PHP page
// and edit the file name
include "poll/ajax-poller.php.php";
?>
The above is the include file.
<a href="#" onclick="castMyVote(<? echo $pollerId; ?>,document.forms[0])"><img src="img/vote_button.gif"></a>
</div>
<div class="poller_waitMessage" id="poller_waitMessage<? echo $pollerId; ?>">
Getting poll results. Please wait...
</div>
<div class="poller_results" id="poller_results<? echo $pollerId; ?>">
<!-- This div will be filled from Ajax, so leave it empty --></div>
The above is from the on click.
function castMyVote(pollId,formObj)
{
var elements = document.forms['poller'].elements['vote[' + pollId + ']'];
var optionId = false;
for(var no=0;no<elements.length;no++){
if(elements[no].checked)optionId = elements[no].value;
}
Poller_Set_Cookie('hyipcharts_poller_' + pollId,'1',6000000);
if(optionId){
var ajaxIndex = ajaxObjects.length;
ajaxObjects[ajaxIndex] = new sack();
ajaxObjects[ajaxIndex].requestFile = serverSideFile + '?pollId=' + pollId + '&optionId=' + optionId;
prepareForPollResults(pollId);
ajaxObjects[ajaxIndex].onCompletion = function(){ showVoteResults(pollId,ajaxIndex); }; // Specify function that will be executed after file has been found
ajaxObjects[ajaxIndex].runAJAX(); // Execute AJAX function
The above from ajax poller.
If you need more code let me know. Just to recap, when I click on the vote button nothing happens. I replaces the # with ajax-poller-cast-vote-php.php and got the no success msg.
Any help would be appreciated.
Thanks