JIM wrote:
Hello,
I've an asp:Imagebutton on my form with the visible property set to
false
<asp:Imagebutton ID="tstImage" runat=Server visible=False>
How can I set the visible propery to true using a javascript ?
I tried something like
document.GetElementById('ImgTest').visible='true'; but without succes
....
You can't. When its visible property is set to false, it is not rendered in
the client, so there is nothing there on which the clientside code can act.
What you have to do is set its visible property to true. That way there will
be an html element in the client DOM on which client-side code can act.
You can set its display style to none in the body onload event. You can set
it to inline or block in whatever event you are thinking of using to set it
to visible.
Bob Barrows
PS. microsoft.public.inetserver.asp.general is for classic ASP questions. I
have removed that group from the crosspost.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.