Can we set file extension and MaxsizeKb using javascript?

  •  02-16-2009, 7:27 AM

    Can we set file extension and MaxsizeKb using javascript?

    Hi,
     
    Is there is any way to set file extension and MaxSizeKb using javascript.
     
    I am using uploadattachments control in ModelPopupExtender and calling this ModelPopupExtender popup on buttons click.
    So I want on button1 click control should allow file extension .jpg only and on button2 click .html only.
    I have tried following javascript code but not working.

    var cupControl = document.getElementById('ctl00_ContentPlaceHolderUI_CuteUploader');

    cupControl.setAttribute('Extensions','jpg');

     
    Please help.
     
    Regards,
    Yogesh
      
View Complete Thread