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

8/22/2022 - Mon
leakim971

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

For example, replace :

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

sorry :

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

I miss the dot in the new one
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
Your help has saved me hundreds of hours of internet surfing.
fblack61
ASKER
transitnetwork

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

This is so strange.
leakim971

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
ASKER
transitnetwork

My apologies i'm stripping out the code that's not needed, this is why you received an error regarding that other code
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
leakim971

see difference between $(".vote") and jQuery(".vote")
Clipboard04.jpg
ASKER
transitnetwork

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
leakim971

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
transitnetwork

awesome
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy