Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 749977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:29:50+00:00 2026-05-14T14:29:50+00:00

Basically, I’ve created a 5-star rating system. Pretty typical. It shows how many stars

  • 0

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!

I probably should have added. For complicated reasons, this is straight js, not jquery or anything else.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T14:29:51+00:00Added an answer on May 14, 2026 at 2:29 pm

    It really depends on how you’ve implemented your code, but say you have some links:

    <div id="star-1" class="rate-it"><!-- HTML markup for your 5 stars --></div>
    <div id="star-2" class="rate-it"><!-- HTML markup for your 5 stars --></div>
    

    and have dynamically added the onclick to the base div, then in the called function you would do something like this:

    function rateStars() {
       if(!this.rated) {
          this.rated = true;
          ...other code...
       }
    }
    

    it kinda depends what is in scope, but this would work if the HTML element is the scope.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically I have some code to check a specific directory to see if an
Basically, I have a matrix class like this (with a lot of operator overloads
Basically, I have an array, let's say @badvalues . I have another array, let's
Basically, I have a table. Onload, I set each row of the table to
basically, I'm stuck ha. I have a page where a video gets downloaded. It
basically i have this problem i have a table of posts(in my mysql database)
Basically when I have an application in XCode and I change the sqlite/coredata database
Basically I have two models: User and Godfather. The godfather table has three columns:
Basically I have this server app I built in vc#, and for some reason
Basically I have some sort of third party software running on Windows 7 which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.