to make enabled=true
-
<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.
-
<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.
-
What's the exact problem??
"Legacy code" often differs from its suggested alternative by actually working and scaling. —Bjarne Stroustrup
-
What's the exact problem??
"Legacy code" often differs from its suggested alternative by actually working and scaling. —Bjarne Stroustrup
-
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
-
<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.
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 )
-
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 )
-
<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.
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
, notenabled
.Despite everything, the person most likely to be fooling you next is yourself.
-
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.
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 )
-
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
, notenabled
.Despite everything, the person most likely to be fooling you next is yourself.
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,