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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:11:31+00:00 2026-05-16T14:11:31+00:00

Using jQuery I want to be able to click an element which will also

  • 0

Using jQuery I want to be able to click an element which will also checks it’s related radio button. I had this working fine until we had to add runat=”server” to the radio buttons.

When I apply this it prevents my jQuery function from working and I cant figure out how to get round it, heres a simplified version of the code:

HTML

<input type="radio" runat="server" id="sector1Radio" name="SectorGroup" title="Sector1" />

jQuery

$('#SomethingElse').click(function() {
    $('input[title=Sector1]').attr('checked','checked');
});

I’ve found out that when its converted to a .net control instead of checked=”checked” (as it would be usually) it is just Checked, so I changed that but on inspecting the DOM in multiple browsers, none of my radio buttons are being checked 🙁

Are there any other ways I can use jQuery to check a radio button that has runat=”server”?

Cheers!

  • 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-16T14:11:31+00:00Added an answer on May 16, 2026 at 2:11 pm

    I think that Your problem is that the id of the input is no longer sector1Radio but rather ctl00_sector1Radio or something similar. This happens if Your input control is inside e.g. a ContentPlaceHolder control (when using master pages).

    Can You check the generated HTML code (in the browser) to verify if this is the case? What is the id of the input control?

    If this is the case, You need to generate Your js jQuery code

    $('#SomethingElse').click(function() {
      $('input[title=Sector1]').attr('checked','checked');
    });
    

    from codebehind so that SomeThingElse is replaced with the ClientID of the control.

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

Sidebar

Related Questions

Using jQuery I want to bind an existing function to a button. I've been
I want to create multilevel accordion Navigation using jQuery , I tried using this
I'm using the Jquery full calendar plugin, and i want to be able to
Im using jquery and want each form text input to appear one by one,
I'm using jQuery Mobile and want to turn of Ajax handling because it does
I'm using jQuery Mobile and I want to detect the speed of a swipe
I am using jquery UI tabs and want to know that , is it
I am using QUnit and JQuery and want to test user interface of my
I want to create a multilevel menu using jQuery. The main idea is by
I want to read multiple RSS feeds using jQuery. I'm trying to write a

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.