Solved

ajax voting buttons not working

Posted on 2010-11-12
10
477 Views
Last Modified: 2012-05-10
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 :)
0
Comment
Question by:transitnetwork
  • 5
  • 4
10 Comments
 
LVL 82

Expert Comment

by:leakim971
Comment Utility
You have multiple javascript framework and use try to use the $ for jQuery.
Use jQuery instead

For example, replace :

$(".vote") by jQuery("vote")
0
 
LVL 82

Expert Comment

by:leakim971
Comment Utility
sorry :

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

I miss the dot in the new one
0
 

Expert Comment

by:Shanksben
Comment Utility
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
0
 

Author Comment

by:transitnetwork
Comment Utility
changing the $ to jQuery and removing scriptaculous did nothing to resolve the problem

This is so strange.
0
 
LVL 82

Expert Comment

by:leakim971
Comment Utility
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
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:transitnetwork
Comment Utility
My apologies i'm stripping out the code that's not needed, this is why you received an error regarding that other code
0
 
LVL 82

Expert Comment

by:leakim971
Comment Utility
see difference between $(".vote") and jQuery(".vote")
Clipboard04.jpg
0
 

Author Comment

by:transitnetwork
Comment Utility
okay so it was the scriptaculous conflicting, but how do I keep both?

replacing $(".vote") by jQuery(".vote") does not make it work
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 250 total points
Comment Utility
0
 

Author Closing Comment

by:transitnetwork
Comment Utility
awesome
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now