[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
www.dhtmlgoodies.com • View topic - Multiple Forms with Ajax Poller
Page 1 of 1

Multiple Forms with Ajax Poller

PostPosted: Tue Jun 24, 2008 10:15 am
by kent3800
Is there a way to identify the Ajax poller by <div> element rather than by form element? It seems that if you have multiple forms on a page this tag needs to be altered:

FROM:

<a href="#" onclick="castMyVote(<? echo $pollerId; ?>,document.forms[0])"><img src="/survey/images/vote_button.gif" border="0"></a>

TO:

<a href="#" onclick="castMyVote(<? echo $pollerId; ?>,document.forms[2])"><img src="/survey/images/vote_button.gif" border="0"></a>

I am trying to include the poller with a php include but I sometimes have a different number of forms on a page i.e. search, contact, newsletter etc.

If it is possible to identify the poller via some other method please let us know.

Thanks! Great Poll!

Here is the multiple form solution

PostPosted: Tue Jun 24, 2008 5:54 pm
by kent3800