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. to make enabled=true

to make enabled=true

Scheduled Pinned Locked Moved Web Development
sysadminquestion
10 Posts 5 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
    ritu4321
    wrote on last edited by
    #1

    <asp:ImageButton ID="imgbtnFromDate" runat="server" enabled="false" ImageUrl="~/Images/SmallCalendar.gif" /> I have this image button . On click of the radio button which i am getting how can i get this button enabled. i want to do this through javascripting.

    R C G 3 Replies Last reply
    0
    • R ritu4321

      <asp:ImageButton ID="imgbtnFromDate" runat="server" enabled="false" ImageUrl="~/Images/SmallCalendar.gif" /> I have this image button . On click of the radio button which i am getting how can i get this button enabled. i want to do this through javascripting.

      R Offline
      R Offline
      ritu4321
      wrote on last edited by
      #2

      that is what i am not getting.

      N 1 Reply Last reply
      0
      • R ritu4321

        that is what i am not getting.

        N Offline
        N Offline
        Nilesh Hapse
        wrote on last edited by
        #3

        What's the exact problem??

        "Legacy code" often differs from its suggested alternative by actually working and scaling. —Bjarne Stroustrup

        R 1 Reply Last reply
        0
        • N Nilesh Hapse

          What's the exact problem??

          "Legacy code" often differs from its suggested alternative by actually working and scaling. —Bjarne Stroustrup

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

          through javascripting i want to enable and disabled a image button.

          N 1 Reply Last reply
          0
          • R ritu4321

            through javascripting i want to enable and disabled a image button.

            N Offline
            N Offline
            Nilesh Hapse
            wrote on last edited by
            #5

            ritu4321 wrote:

            through javascripting i want to enable and disabled a image button.

            Do you know how to access server controls using Javascript?

            "Legacy code" often differs from its suggested alternative by actually working and scaling. —Bjarne Stroustrup

            1 Reply Last reply
            0
            • R ritu4321

              <asp:ImageButton ID="imgbtnFromDate" runat="server" enabled="false" ImageUrl="~/Images/SmallCalendar.gif" /> I have this image button . On click of the radio button which i am getting how can i get this button enabled. i want to do this through javascripting.

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              First, you need to store the client side Id of this control in javascript as a variable. Then you can use this to call 'getElementById', and finally, you can set it's properties.

              Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

              R 1 Reply Last reply
              0
              • C Christian Graus

                First, you need to store the client side Id of this control in javascript as a variable. Then you can use this to call 'getElementById', and finally, you can set it's properties.

                Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                R Offline
                R Offline
                ritu4321
                wrote on last edited by
                #7

                i know that all since i have been working in javascripting for long . bUT could not enable and disable image control on selection of radio button.

                C 1 Reply Last reply
                0
                • R ritu4321

                  <asp:ImageButton ID="imgbtnFromDate" runat="server" enabled="false" ImageUrl="~/Images/SmallCalendar.gif" /> I have this image button . On click of the radio button which i am getting how can i get this button enabled. i want to do this through javascripting.

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

                  As you don't show any code, I have to guess. My guess is that you have mixed up server control properties with client element properties. The javascript property for this is disabled, not enabled.

                  Despite everything, the person most likely to be fooling you next is yourself.

                  A 1 Reply Last reply
                  0
                  • R ritu4321

                    i know that all since i have been working in javascripting for long . bUT could not enable and disable image control on selection of radio button.

                    C Offline
                    C Offline
                    Christian Graus
                    wrote on last edited by
                    #9

                    Well, perhaps you need to word your question better then. it's still straightforward. Add an onclick to the radio button, which calls a javascript method that does everything I said before.

                    Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

                    1 Reply Last reply
                    0
                    • G Guffa

                      As you don't show any code, I have to guess. My guess is that you have mixed up server control properties with client element properties. The javascript property for this is disabled, not enabled.

                      Despite everything, the person most likely to be fooling you next is yourself.

                      A Offline
                      A Offline
                      Amol M Vaidya
                      wrote on last edited by
                      #10

                      thanks... atlast something that is useful.. additionally i would like to mention that the server controls when changed in Javascript will obviously retain their original property after a postback :-) Regards,

                      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