Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to insert item in RadioButtonList using java script in asp.net

How to insert item in RadioButtonList using java script in asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpjavaasp-nettoolshelp
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rajesh_K_Sharma
    wrote on last edited by
    #1

    Hi , I would like to add item in web control RadioButtonList using java script . Any help is appriciated. Regards Rajesh

    rajesh

    S 1 Reply Last reply
    0
    • R Rajesh_K_Sharma

      Hi , I would like to add item in web control RadioButtonList using java script . Any help is appriciated. Regards Rajesh

      rajesh

      S Offline
      S Offline
      Sathesh Sakthivel
      wrote on last edited by
      #2

      function RadioChecked(param) { { var frm = document.forms[0]; // Take all elements of the form for (i=0; i < frm.length; i++) { // itinerate the elements searching "RadioButtons" if (frm.elements[i].type == "radio") { // Unchecked if the RadioButton is != param if (param != frm.elements[i].id ) { frm.elements[i].checked = false; } } } } }

      Regards, Satips.:rose:

      R 1 Reply Last reply
      0
      • S Sathesh Sakthivel

        function RadioChecked(param) { { var frm = document.forms[0]; // Take all elements of the form for (i=0; i < frm.length; i++) { // itinerate the elements searching "RadioButtons" if (frm.elements[i].type == "radio") { // Unchecked if the RadioButton is != param if (param != frm.elements[i].id ) { frm.elements[i].checked = false; } } } } }

        Regards, Satips.:rose:

        R Offline
        R Offline
        Rajesh_K_Sharma
        wrote on last edited by
        #3

        Thanks Satips, But my question is how to add item in RadioButtonList . Like I write a code in code behind .cs file RadioButtonList.item.add(a); RadioButtonList.item.add(b); RadioButtonList.item.add(c); RadioButtonList.item.add(d); RadioButtonList.item.add(e); Similarly , i want to add item in RadioButtonList using java script. How can i do it? Regards Rajesh

        rajesh

        R G S 3 Replies Last reply
        0
        • R Rajesh_K_Sharma

          Thanks Satips, But my question is how to add item in RadioButtonList . Like I write a code in code behind .cs file RadioButtonList.item.add(a); RadioButtonList.item.add(b); RadioButtonList.item.add(c); RadioButtonList.item.add(d); RadioButtonList.item.add(e); Similarly , i want to add item in RadioButtonList using java script. How can i do it? Regards Rajesh

          rajesh

          R Offline
          R Offline
          revi22
          wrote on last edited by
          #4

          What method do you think is better when there are many threads? Regards, Analizzatore Cloro

          1 Reply Last reply
          0
          • R Rajesh_K_Sharma

            Thanks Satips, But my question is how to add item in RadioButtonList . Like I write a code in code behind .cs file RadioButtonList.item.add(a); RadioButtonList.item.add(b); RadioButtonList.item.add(c); RadioButtonList.item.add(d); RadioButtonList.item.add(e); Similarly , i want to add item in RadioButtonList using java script. How can i do it? Regards Rajesh

            rajesh

            G Offline
            G Offline
            Guffa
            wrote on last edited by
            #5

            You can't do that. The RadionButtonList control doesn't exist in the browser, it only exists on the server while the page is created. As what you are asking for is impossible, what is it that you want to accomplish?

            --- single minded; short sighted; long gone;

            1 Reply Last reply
            0
            • R Rajesh_K_Sharma

              Thanks Satips, But my question is how to add item in RadioButtonList . Like I write a code in code behind .cs file RadioButtonList.item.add(a); RadioButtonList.item.add(b); RadioButtonList.item.add(c); RadioButtonList.item.add(d); RadioButtonList.item.add(e); Similarly , i want to add item in RadioButtonList using java script. How can i do it? Regards Rajesh

              rajesh

              S Offline
              S Offline
              Sathesh Sakthivel
              wrote on last edited by
              #6

              You cannot do as how you have stated for the Radio Button list. Since the Radio buttonlist control exist on the server side while the page is creatred this method is impossible. so go with the method as how i have stated before.

              Regards, Satips.:rose:

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups