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
  1. Home
  2. Web Development
  3. ASP.NET
  4. [Message Deleted]

[Message Deleted]

Scheduled Pinned Locked Moved ASP.NET
9 Posts 3 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.
  • D Offline
    D Offline
    deepthy p m 0
    wrote on last edited by
    #1

    [Message Deleted]

    R I 2 Replies Last reply
    0
    • D deepthy p m 0

      [Message Deleted]

      R Offline
      R Offline
      r aa j
      wrote on last edited by
      #2

      you given wrong condtion.. document.form1.txt1.disabled=true; put document.form1.txt1.enabled=true; function select() { if(document.getElementById("RadioButton1").checked==true) { document.form1.txt1.enabled=true; } else { document.form1.txt1.disabled=true; } }

      Rajendran.AL

      D 1 Reply Last reply
      0
      • R r aa j

        you given wrong condtion.. document.form1.txt1.disabled=true; put document.form1.txt1.enabled=true; function select() { if(document.getElementById("RadioButton1").checked==true) { document.form1.txt1.enabled=true; } else { document.form1.txt1.disabled=true; } }

        Rajendran.AL

        D Offline
        D Offline
        deepthy p m 0
        wrote on last edited by
        #3

        i put alert(1) in that javascript function.But that function is not working .

        R 1 Reply Last reply
        0
        • D deepthy p m 0

          i put alert(1) in that javascript function.But that function is not working .

          R Offline
          R Offline
          r aa j
          wrote on last edited by
          #4

          is there onclick event in radiobutton...check it

          Rajendran.AL

          D 1 Reply Last reply
          0
          • R r aa j

            is there onclick event in radiobutton...check it

            Rajendran.AL

            D Offline
            D Offline
            deepthy p m 0
            wrote on last edited by
            #5

            If the radio button is checked i want to set the visiblility of that text box false.but its not working

            R 1 Reply Last reply
            0
            • D deepthy p m 0

              If the radio button is checked i want to set the visiblility of that text box false.but its not working

              R Offline
              R Offline
              r aa j
              wrote on last edited by
              #6

              I think server radiobutton should not contain onclick event... otherwise you will take html radio button instead of server radiobutton...

              Rajendran.AL

              D 1 Reply Last reply
              0
              • R r aa j

                I think server radiobutton should not contain onclick event... otherwise you will take html radio button instead of server radiobutton...

                Rajendran.AL

                D Offline
                D Offline
                deepthy p m 0
                wrote on last edited by
                #7

                i use the following code to hide text boxes function select1() { if(document.form1.RadioButton1.checked==true) { document.getElementById("TextBox1").style.visibility='hidden'; document.getElementById("TextBox2").style.display='visible'; } else { document.getElementById("TextBox1").style.visibility='visible'; document.getElementById("TextBox2").style.visibility='hidden'; } } <script> <sp:radiobutton id="RadioButton1" runat="server" onclick="javascript:select1();" xmlns:sp="#unknown"> <asp:textbox id="TextBox1" runat="server" xmlns:asp="#unknown"></asp:textbox> <asp:textbox id="TextBox2" runat="server" xmlns:asp="#unknown"></asp:textbox> its working correctly but when i set texbox visibility false it display an error. On page load i want to set the visibility of text boxes false .It will visible only radio button click.i think u can understand my problem.pls help me. </sp:radiobutton>

                R 1 Reply Last reply
                0
                • D deepthy p m 0

                  [Message Deleted]

                  I Offline
                  I Offline
                  Imran Khan Pathan
                  wrote on last edited by
                  #8

                  First of all, radio button does not work like as checkbox. I mean that when you check radio button on first click,you can not able to uncheck it on second click.so you can not disabled or enabled textbox by checking radio button is check or uncheck. Que : why have you taken radio button? you could also take checkbox.

                  please don't forget to vote on the post that helped you.

                  1 Reply Last reply
                  0
                  • D deepthy p m 0

                    i use the following code to hide text boxes function select1() { if(document.form1.RadioButton1.checked==true) { document.getElementById("TextBox1").style.visibility='hidden'; document.getElementById("TextBox2").style.display='visible'; } else { document.getElementById("TextBox1").style.visibility='visible'; document.getElementById("TextBox2").style.visibility='hidden'; } } <script> <sp:radiobutton id="RadioButton1" runat="server" onclick="javascript:select1();" xmlns:sp="#unknown"> <asp:textbox id="TextBox1" runat="server" xmlns:asp="#unknown"></asp:textbox> <asp:textbox id="TextBox2" runat="server" xmlns:asp="#unknown"></asp:textbox> its working correctly but when i set texbox visibility false it display an error. On page load i want to set the visibility of text boxes false .It will visible only radio button click.i think u can understand my problem.pls help me. </sp:radiobutton>

                    R Offline
                    R Offline
                    r aa j
                    wrote on last edited by
                    #9

                    better you can try with checkbox...

                    Rajendran.AL

                    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