Reputation: 969
i am writting the javascript function like this
function PreviewImg(imgFile, labelid,frameid) {
labelid.innerHTML = imgFile.value;
document.getElementById('btnupload').click();
}
Above code document.getElementById('btnupload').click(); is the error but firefox browser is supported but i have support IE8 , pls give me suggestion
error is htmlfile: Access is denied.
Upvotes: 1
Views: 3176
Reputation: 136
this one also works for me.
document.getElementById('ctl00_btnupload').click();
but you can test it by yourself. Good luck..
Upvotes: 2
Reputation: 21117
document.getElementById('<%= btnupload.ClientID %>').click();
Upvotes: 2