1

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.

1
  • use JQuery for fuly cross-browser javascript ! Commented Oct 22, 2011 at 10:41

2 Answers 2

2

this one also works for me.

document.getElementById('ctl00_btnupload').click();

but you can test it by yourself. Good luck..

Sign up to request clarification or add additional context in comments.

1 Comment

try this one: document.getElementById('<%=btnUpload.clientID%>').click(). may be this one working.
2
document.getElementById('<%= btnupload.ClientID %>').click();

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.