If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Advanced Poll 2.0.2-Pop up window shows a JavaScript error  XML
Forum Index » Support Forum
Author Message
Anonymous



Hello.

I've been using Advanced Poll and Guestbook for almost a year on my website and I am really happy with them. But now, I made the whole site dynamic and I have a problem with the Poll.

Here is the page:

http://www.daredevil-inside.com/index2.php

Poll is in the middle on the right side. I want the newest one to be displayed and I have chosen the pop up template, having written the code like this:

<?php
include("/MYPATH/www/polls/booth.php");
$php_poll->set_template_set("popup");
echo $php_poll->poll_process("newest");
?>


But, I am getting a JavaScript error every time I want to vote or check results.

Can you please tell me what I am doing wrong?
egeurts
Beginner

Joined: 12/08/2003 09:38:19
Messages: 44
Location: Groningen, Netherlands
Offline

What is the exact error message you get?

Opening message voids warranty.
When I'm not surfing the web, I'm probably walking in the mountains.
See for yourself! www.corsica-hiking.com
[WWW]
Supersonic Squirrel
Beginner

Joined: 26/08/2003 15:19:33
Messages: 8
Location: Serbia &amp; Montenegro
Offline

This:

http://www.supersonicsquirrel.net/lj/stuff/error.jpg[/url]

http://www.supersonicsquirrel.net
http://www.daredevil-inside.com
http://www.flatoutblind.org
http://hocki.supersonicsquirrel.net
[Email] [WWW]
Supersonic Squirrel
Beginner

Joined: 26/08/2003 15:19:33
Messages: 8
Location: Serbia &amp; Montenegro
Offline

This:

http://www.supersonicsquirrel.net/lj/stuff/error.jpg

http://www.supersonicsquirrel.net
http://www.daredevil-inside.com
http://www.flatoutblind.org
http://hocki.supersonicsquirrel.net
[Email] [WWW]
egeurts
Beginner

Joined: 12/08/2003 09:38:19
Messages: 44
Location: Groningen, Netherlands
Offline

Hi,
I've had a look at your site. I was able to vote without problems. I got a popup with a result. I closed the popup and then clicked on the 'results' link. Then I too got the error.

I looked at the exact code behind this 'results' link. This is what I found:

The problem is located in the javascript, there is no function called 'void', you named the function poll_results_24. Remove the 'void' part plus the two ( ) that you've added.

It should probably look something like this:


Have a look, see if this helps.

Good luck

Opening message voids warranty.
When I'm not surfing the web, I'm probably walking in the mountains.
See for yourself! www.corsica-hiking.com
[WWW]
Supersonic Squirrel
Beginner

Joined: 26/08/2003 15:19:33
Messages: 8
Location: Serbia &amp; Montenegro
Offline

The weirdest thing is that I didn't add that part, it was like that when I started editing it. Maybe it has something to do with the fact that I downloaded the script in September 2002?

And it still doesn't work. Maybe it works only for people who didn't vote before.
I was trying to have a regular result without a pop-up, but it was opening the whole frameset in the middle of the inline frame....

http://www.supersonicsquirrel.net
http://www.daredevil-inside.com
http://www.flatoutblind.org
http://hocki.supersonicsquirrel.net
[Email] [WWW]
egeurts
Beginner

Joined: 12/08/2003 09:38:19
Messages: 44
Location: Groningen, Netherlands
Offline

that could be solved (the iframe problem) by naming the iframe properly, and using the right target for the link. In that way, you can have anything (like any .php program) running completely on it's own inside a little frame. I've done it with my guestbook, and plan to do it with the poll to.

Opening message voids warranty.
When I'm not surfing the web, I'm probably walking in the mountains.
See for yourself! www.corsica-hiking.com
[WWW]
Supersonic Squirrel
Beginner

Joined: 26/08/2003 15:19:33
Messages: 8
Location: Serbia &amp; Montenegro
Offline

So, you say that I should put the polls in a small inline frame, rather than including them as php?

Or...if you meant that I can keep it like this with results opening in the main frame, I tried to, I checked all the targets, but I was getting the same result all over-the whole index2.php opening inside of that inline frame.

http://www.supersonicsquirrel.net
http://www.daredevil-inside.com
http://www.flatoutblind.org
http://hocki.supersonicsquirrel.net
[Email] [WWW]
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum