javascript disabling a div or a link? (for a 5-star rating system)
Posted
by Cyprus106
on Stack Overflow
See other posts from Stack Overflow
or by Cyprus106
Published on 2010-04-26T23:03:34Z
Indexed on
2010/04/26
23:13 UTC
Read the original article
Hit count: 242
JavaScript
|html
Basically, I've created a 5-star rating system. Pretty typical. It shows how many stars other people have given the item, and then when a user hovers over the stars, it lights up x number of stars based on how many they're over.
It's all run by AJAX. They click 5 stars it automatically adds their 5-star rating to the group. The problem is that after they rate it I want to turn the system off, but I can't seem to be able to do that.
I've tried everything I can think of. I've tried using element.disable for the a hrefs and for the div, but it still lets them vote away, over and over again, at least in firefox.... Can anyone help me out with a method to simply "freeze" the stars on what the user voted?? If I need to add code that's cool! I figured it probably wasn't necessary in this situation!
© Stack Overflow or respective owner