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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:22:05+00:00 2026-05-26T19:22:05+00:00

I was using jQuery UI Dialog and jQuery to select a radio button. I

  • 0

I was using jQuery UI Dialog and jQuery to select a “radio” button.

I have 2 dialog, one for “calculator”, another for “expert_mode”.

However, when I select a 'input[value="simple"]' under calculator, it also affects an input under expert_mode with the same name, how to fix that??

Followings are my codes:

This is my HTML (simplified):

<div name="widget">
    <div name="calculator">
        <input name="mode" value="a" type="radio" **checked="checked"**/>
        <input name="mode" value="b" type="radio"/>
        <input name="mode" value="c" type="radio"/>
    </div>
    <div name="expert">
        <input name="mode" value="simple" type="radio"/>
        <input name="mode" value="advanced" type="radio"/>
        <input name="mode" value="custom" type="radio"/>
    </div>
</div>

And the JavaScript:

var widget=$('div[name="widget"]');
var calculator=widget.find('div[name="calculator"]');
var expert=widget.find('div[name="expert"]');

calculator.dialog();
expert.dialog();

Then, when I do this:

expert.find('input[value="simple"]').attr('checked',true);

It becomes:

<div name="widget">
    <div name="calculator">
        <input name="mode" value="a" type="radio"/> ***Here, "checked" disappear!!***
        <input name="mode" value="b" type="radio"/>
        <input name="mode" value="c" type="radio"/>
    </div>
    <div name="expert">
        <input name="mode" value="simple" type="radio" checked="checked"/>
        <input name="mode" value="advanced" type="radio"/>
        <input name="mode" value="custom" type="radio"/>
    </div>
</div>
  • 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-26T19:22:05+00:00Added an answer on May 26, 2026 at 7:22 pm

    The problem is the name of your input elements, not your jQuery. As all of the radio buttons have the same name, they are treated as one group, and only one radio button can be checked per group. You will have to change the name of one set of radio buttons, for example (simplified):

    <div name="calculator">
        <input name="mode" value="a" type="radio"/>
    </div>
    <div name="expert">
        <input name="expertMode" value="simple" type="radio" checked="checked"/>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using jquery for modal dialogs. I want to open model dialog from one
I using this jquery script to open a dialog on my page. I have
i'm using jquery 1.3.2, and have a problem in situatsuin where i fill select
I need to fill a object using jQuery I have a dialog (jQueryUI) that
I have tried to figure out a way of letting a jquery dialog button
I have a view with a button that opens a jquery dialog via partial
I'm using jQuery UI dialog. I have a delete form as follows: @using (Ajax.BeginForm(DeleteUser,
I have a link to delete action using Jquery dialog confirm message. Clicking on
Using jquery alerts dialog plugin , how do I send a value in a
I have a issue with Jquery Modal dialog being called from a button inside

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.