Avatar of transitnetwork
transitnetworkFlag for Canada

asked on 

ajax voting buttons not working

I can't get these voting buttons to work for the life of me, the javascript just won't run and i can't figure out why

http://reviewsource.ca/reviews.php 

I have it working fine on my filecart.com site but it just won't run on this, i must be missing something, please let me know if you can find the problem

thanks :)
AJAXPHP

Avatar of undefined
Last Comment
transitnetwork
Avatar of leakim971
leakim971
Flag of Guadeloupe image

You have multiple javascript framework and use try to use the $ for jQuery.
Use jQuery instead

For example, replace :

$(".vote") by jQuery("vote")
Avatar of leakim971
leakim971
Flag of Guadeloupe image

sorry :

$(".vote") by jQuery(".vote")

I miss the dot in the new one
Avatar of Shanksben
Shanksben

Your code must be right:
$(".vote") and whatever follow after.
Try put your 'vote' class in double quotes in your HTML code and everything should work fine.
If it doesn't, try to remove scriptaculous and leave jQuery. The issue is that prototype (scriptaculous uses prototype) 'hooks' native elements properties and that may make others libraries not to function well.
I suggest to stick to one library and use it. It may help reduce code collision. Try jQuery as leakim971 suggests.
Firebug will greatly improve your javascript debugging options, download it in case you don't have it.

Kind Regards
Avatar of transitnetwork
transitnetwork
Flag of Canada image

ASKER

changing the $ to jQuery and removing scriptaculous did nothing to resolve the problem

This is so strange.
Avatar of leakim971
leakim971
Flag of Guadeloupe image

The previous error about the "vote" left.
You've new ones, for example it seems you don't have any submit_btn or reset_btn in your page...
Clipboard03.jpg
Avatar of transitnetwork
transitnetwork
Flag of Canada image

ASKER

My apologies i'm stripping out the code that's not needed, this is why you received an error regarding that other code
Avatar of leakim971
leakim971
Flag of Guadeloupe image

see difference between $(".vote") and jQuery(".vote")
Clipboard04.jpg
Avatar of transitnetwork
transitnetwork
Flag of Canada image

ASKER

okay so it was the scriptaculous conflicting, but how do I keep both?

replacing $(".vote") by jQuery(".vote") does not make it work
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of transitnetwork
transitnetwork
Flag of Canada image

ASKER

awesome
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo