views:

10

answers:

0

Hi, I've got an Update Panel and a button that look a bit like this:

<asp:UpdatePanel runat="server" ID="querypanel" UpdateMode="Conditional">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="submit" />
            <asp:PostBackTrigger ControlID="okbutton" />
        </Triggers>
        <ContentTemplate>
<asp:Button runat="server" 
                        id="okbutton" 
                        onclick="ok" 
                        OnClientClick="statustimeout();"
                        CssClass="popupbuttons" 
                        Text="OK" />
        <div id="status" runat="server"></div>

<!-- snip a bunch of seemingly unimportant stuff stuff -->
<asp:Button runat="server" ID="Submit" Text="Update Database" onclick="checkForm"  />
</ContentTemplate>
</asp:UpdatePanel>

and inside my statustimeout is

function statustimeout(){
    setTimeout('document.getElementById("status").innerHTML = "";', 5000);
    setTimeout('document.getElementById("status").style.visibility = "hidden";', 5000);
    setTimeout('document.getElementById("status").style.display = "none";', 5000);
}

Now, before I had okbutton as a trigger, it worked fine firing statustimeout. But now I think it's firing, but the status element doesn't actually disappear until after I do some other thing that generates an autopostback.

How can I make my status div disappear like it used to?