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..
精彩评论