asp:ImageButton and javascript

Discussion in 'ASP General' started by JIM, Mar 18, 2005.

  1. JIM

    JIM Guest

    Hello,

    Does anyone knows how to set the visible property of an asp:Imagebutton to
    true
    with javascript

    I've the following declared :

    <asp:ImageButton Id="tstImage" runat="server" visible="False" />

    I tried already document.GetElementById('tstImage').visible='true';

    but without success

    Any idea ?

    Many thanks,

    Karel
     
    JIM, Mar 18, 2005
    #1
    1. Advertising

  2. JIM

    Bruce Barker Guest

    if you set a server control to visible="False", its not rendered in the
    html, so there is no way to make it visible in client code (short of using
    dhtml and creating the object and adding it to the dom).

    -- bruce (sqlwork.com)

    "JIM" <> wrote in message
    news:QHI_d.44260$-ops.be...
    > Hello,
    >
    > Does anyone knows how to set the visible property of an asp:Imagebutton to
    > true
    > with javascript
    >
    > I've the following declared :
    >
    > <asp:ImageButton Id="tstImage" runat="server" visible="False" />
    >
    > I tried already document.GetElementById('tstImage').visible='true';
    >
    > but without success
    >
    > Any idea ?
    >
    > Many thanks,
    >
    > Karel
    >
     
    Bruce Barker, Mar 19, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SamIAm
    Replies:
    0
    Views:
    472
    SamIAm
    Oct 29, 2003
  2. JIM

    Asp:Imagebutton and javascript

    JIM, Mar 18, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    8,702
    Bob Barrows [MVP]
    Mar 18, 2005
  3. JIM

    asp:ImageButton and javascript

    JIM, Mar 18, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    510
    Bruce Barker
    Mar 19, 2005
  4. Alex D.
    Replies:
    5
    Views:
    4,609
    Alejandro Penate-Diaz
    Jun 1, 2005
  5. rum23

    asp:ImageButton and onClientClick and page refresh

    rum23, Nov 28, 2008, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    684
Loading...

Share This Page