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 796941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:43:14+00:00 2026-05-14T22:43:14+00:00

I am looking for a way to debug what a jquery selector returns. I

  • 0

I am looking for a way to debug what a jquery selector returns. I have tried using toString(), but that only ever returns [object Object].

What I am actually trying to do is to attach a callback to radio buttons. And onclick
on one of the buttons, I want to submit the enclosing form.

Therefore I try to do something like this:

$(".rating").stars({
    cancelShow: false,
    callback: function(ui, type, value, event) {
        $(this).closest('form').ajaxSubmit();
    }
});

Unfortunately, nothing happens.

Here is a complete example of what I am trying to do:

<script type="text/javascript" src="http://localhost:8000/media/js/jquery.js?v=1.4.2"></script>
<script type="text/javascript" src="http://localhost:8000/media/js/jquery.form.js?v=2.4.3"></script>
<script type="text/javascript" src="http://localhost:8000/media/js/jquery-ui.custom.min.js?v=1.8"></script>
<script type="text/javascript" language="javascript" src="http://localhost:8000/media/js/jquery.ui.stars.js?v=3.0.0b38"></script>
<link rel="stylesheet" type="text/css" media="all" href="http://localhost:8000/media/css/jquery.ui.stars.css?v=3.0.0b38" />        

<body>
 <script type="text/javascript">
    $(function() {
        $(".rating").children().not(":radio").hide();
        $(".rating").stars({
            cancelShow: false,
            callback: function(ui, type, value, event) {
                alert('NodeName: ' + this.nodeName);
                $(this).each(function() {
                    alert($(this).html());
                });

                alert($(this).length);
            }
        });
    });
 </script>

 <ul class="list">
  <li>
   <form class="rating" id="rating-1" action="/sniphunter/rate/1/" method="post">
    <input type="radio" name="score" value="1" id="rating-1-1" />
    <input type="radio" name="score" value="2" id="rating-1-2" />
    <input type="radio" name="score" value="3" id="rating-1-3" />
    <input type="radio" name="score" value="4" id="rating-1-4" />
    <input type="radio" name="score" value="5" id="rating-1-5" />
    <input type="submit" value="Rate"/>
   </form>
  </li>
 </ul>
</body>
  • 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-14T22:43:15+00:00Added an answer on May 14, 2026 at 10:43 pm

    I downloaded the Star Rating Widget (it looks like the same one you are using) and did some digging… the stars plugin completely removes the radio buttons and replaces them with div’s and links. When you select a star, it saves the value in a hidden input inside the form.

    So, after messing around with it, I found that you can get to the form using ui.$form, so try this:

    $(function(){
        $(".rating").children().not(":radio").hide();
        $(".rating").stars({
            cancelShow: false,
            callback: function(ui, type, value, event)
            {
                alert( ui.$form.attr('id') );  // alerts the form ID
                ui.$form.ajaxSubmit();
            }
        });
    });
    

    Edit: Oh and if you want to access your original radio buttons, they are saved into the ui object as well inside of ui.$rboxs. The following snippet will alert the ID of the original radio button:

    $(function(){
        $(".rating").children().not(":radio").hide();
        $(".rating").stars({
            cancelShow: false,
            callback: function(ui, type, value, event)
            {
                alert( ui.$rboxs[(value-1)].id );
            }
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using codeigniter and looking a way to enable directly editting of doc
My problem is that I was looking for way to use both storyboard and
I've been looking for a way to debug Adobe Air Javascript apps with the
Is there any easy way to debug cgi python programs apart from looking at
I have a dll mytest.dll that when loaded via LoadLibrary() , returns NULL (and
I am looking for a way to see realtime (as I debug) what is
I have a WinForms application and I am looking for a way to do
I am looking for a way to debug compiled assemblies from Visual Studio. Is
I'm looking for an easy way to debug RESTful services. For example, most webapps
Unfortunately, sometimes the only way to debug a program is by going through its

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.