开发者

Enabling a Button after a Method

开发者 https://www.devze.com 2023-03-07 17:19 出处:网络
I am having problems with my javascript. I need a button to \"enable\" after uploading an imag开发者_StackOverflow中文版e, but what happens is it restarts the function. After uploading the image, the

I am having problems with my javascript. I need a button to "enable" after uploading an imag开发者_StackOverflow中文版e, but what happens is it restarts the function. After uploading the image, the button that is disabled will be "enabled" but in just a blink of an eye, it will be disabled again. Any idea how to fix this?


Try this: Keep the display button initially to none as follows:

    <asp:Button id="btnID" runat="server" style="display:none">

After uploading within the upload button click event change the button display to block :

      UploadBtn_Click()
      {
               //perform Upload logic here
                 btnID.attributes.add("style","display:block");
       }

Hope this helps..

0

精彩评论

暂无评论...
验证码 换一张
取 消