Author: sttian2000 | Posted on: 1/21/2007 11:39:18 PM | Views : 449

Hi ASPers,
I have a image to show a Progress Bar while user clicks a button (btnAutoload) and do a heavy db search.
<asp:Image id="imgBar" runat="server" Visible="False" ImageUrl="Images\progressbar.gif"></asp:Image>

I put this code in my Page_Load, but both lines produce the same error: 'document.getElementById(...)' is null or not an object

        If Not IsPostBack Then

            'btnAutoload.Attributes.Add("onclick", "document.getElementById('" & imgBar.ClientID & "').Visible = True;")
            btnAutoload.Attributes.Add("onclick", "document.getElementById('imgBar').Visible = True;")

Can someone help? Thanks in advance!!!
Sam
 
...

Go to the complete details ...