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

  • SEARCH
  • Home
  • 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 689363
In Process

The Archive Base Latest Questions

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

i have a 5 stars rating system, on javascript!!! bau i want to update

  • 0

i have a 5 stars rating system, on javascript!!! bau i want to update mysql table, when clicking on stars!!! can somebody tell me how can i update the table!!!
thanks. . .

  • 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-14T02:19:29+00:00Added an answer on May 14, 2026 at 2:19 am

    Respond to a click by sending an ajax POST to the server. With Prototype, this might look like this:

    document.observe('click', handleDocClick);
    
    function handleDocClick(event) {
        var star;
    
        star = event.findElement('.star'); // <= assumes images have the class "star",
                                           // use any CSS here you like
        if (star) {
            event.stop();
            new Ajax.Request('some_url', {
                parameters: {star: star.id},
                onSuccess:  handleSuccess,
                onFailure:  handleFailure
            });
        }
    }
    

    …and define handleSuccess handleFailure as you see fit. More on the unofficial wiki and in the API docs.

    You can also use jQuery, YUI, Google Closure, and many many other tools, or use the XMLHttpRequest object itself directly.

    That’s the client side. On the server side, you’d have to have a page (PHP, JSP, servlet, ASP.Net, FastCGI, old CGI, Perl, Python, …) that can receive HTTP POSTs and handle them by updating the underlying MySQL data.

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

Sidebar

Related Questions

I have 5 stars system in html/smarty below <ul class=star-rating id={$ID}> <li><a href=# class=one-star></a></li>
I have a newssystem where you can rate News with 1 to 5 stars.
My screenshot http://dl.getdropbox.com/u/240752/stars.gif I want to have it so that only the text is
I have a simple rating system for a property. You give it a mark
Basically, I've created a 5-star rating system. Pretty typical. It shows how many stars
I have recently seen in some Apps that review and rating (with 5 stars)
I already have a 5 star rating system in place (user votes 1-5...and average
I have a working star rating system, but If a user has already voted
I have this Star Rating system right. When you click on a star it
I am trying to write a star rating system in javascript that allows the

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.