AJAX uploader - hiding in JS or Jquery

Last post 07-17-2011, 8:36 AM by Jeff. 2 replies.
Sort Posts: Previous Next
  •  07-14-2011, 10:35 AM 68521

    AJAX uploader - hiding in JS or Jquery

    Hi,
     
    How I hide the ajax uploader control in javascript or in Jquery?  I have a situation where I need to hide the ajax uploader for some scenarios and display it for other scenarios, but I need to do this on the client side.  I tried setting display to none in JS or Jquery but the control still shows.  I noticed that if I set the control's visible property to false in server side code and the control is hidden, but for my scenario I need to to this in on the client side and cannot use visible false.  Any suggestions?
     
    Thank you. 
  •  07-14-2011, 11:56 AM 68522 in reply to 68521

    Re: AJAX uploader - hiding in JS or Jquery

    I think I am all set.  I managed to do this by wrapping a div around the ajax uploader control.  I then hide and show this div using jquery .hide() and .show() functions.  Let me know if anyone has a better way of doing this.
  •  07-17-2011, 8:36 AM 68573 in reply to 68522

    Re: AJAX uploader - hiding in JS or Jquery

    Hi mchamo,
     
    Your method is good.
    Also, you can use the following javascript code to hide and show the control 
     
    1. function Uploader_Hide()  
    2. {  
    3.     var uploader = document.getElementById('<%= Uploader1.ClientID%>');  
    4.     uploader.style.display = "none";  
    5. }  
    6.   
    7. function Uploader_Show()  
    8. {  
    9.     var uploader = document.getElementById('<%= Uploader1.ClientID%>');  
    10.     uploader.style.display = "";  
    11. }  
     Hope it helps.
     
     
    Regards,
    Jeff 
View as RSS news feed in XML