Advertisement

Help with poller script

Moderators: Calcifer, slothy

Help with poller script

Postby jimboble » Wed Dec 27, 2006 10:54 am

Hi there,
I need a little help. I am using the poller script on my site, which works perfectly stand alone. However on a page with multiple form I have no luck. If I remove all other forms it works again. the problem is with this line
for(var no=0;no<elements.length;no++){

from this snippet

function castMyVote(pollId,formObj)
{
var elements = formObj.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('dhtmlgoodies_poller_' + pollId,'1',6000000);
if(optionId){


Many thanks for any suggestions.
jimboble
 
Posts: 2
Joined: Sat Dec 23, 2006 4:56 am

Postby jimboble » Wed Dec 27, 2006 11:35 am

additional: the javascript console says that
Error: elements has no properties


length is null or not an object.


help please!
jimboble
 
Posts: 2
Joined: Sat Dec 23, 2006 4:56 am

Postby Phil » Wed Dec 27, 2006 3:18 pm

Phil
 
Posts: 5
Joined: Fri Oct 27, 2006 11:37 am


Return to General questions regarding AJAX scripts

Who is online

Users browsing this forum: No registered users and 17 guests

cron