function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Surendra nuneSurendra nune 

Issue with XmlHttpRequest and actionregion/actionfunction/commandlink/commandbutton - IE 11

Hi,

I am facing a strange issue in IE11. Please see the below code snippet
<apex:page >

<script type="text/javascript">
function load(){ 
 var request;
        if (window.XMLHttpRequest) {
            request = new XMLHttpRequest();
        } 
 
 if(request.upload){
   alert('upload is allowed');
 }
 }
 load();
</script>


<apex:form id="formid">
<apex:actionfunction name="test" action="{!null}" rerender="formid"/> 
</apex:form>

</apex:page>
I dont get alert if I have the below components in my visualforce page.
  • Commandbutton/commandlink/actionfunction with rerender attribute. 
  • Action region.(Not working even if you just use empty action region).
I need this fix for a file upload utility that I have developed. I am using xhr.upload.onprogress to check the progress of uploaded file.
 
xhr.upload.onprogress = function(e) {

}

The utility is working fine with chrome and firefox, but not working in IE11.
I get the below error, when javascript tries to bind the event.

User-added image

Request you to please let me know if any one have faced similar issue and had any work arounds.
 
AbdelhakimAbdelhakim
Hi,
Try to use jquery
http://stackoverflow.com/questions/5157361/jquery-equivalent-to-xmlhttprequests-upload
 
Marc Dev OrgMarc Dev Org
Did this resolve you problem Surendra? Or did you find another way? We are having the same issue...
Wim VelzeboerWim Velzeboer
It seems that the original XMLHttpRequest is being overwritten by a JavaScript that Salesforce is loading:
<script src="/faces/a4j/g/3_3_3.Finalorg.ajax4jsf.javascript.AjaxScript?rel=1458077252000"type="text/javascript">
To use the original, try this:
xhr = new window.Sarissa.originalXMLHttpRequest();