Bug 1565418 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

> function LoadThisPage(objID, Page, root, loginContent, thisMenu, shopMenu, shopMenuTab, menuDisp) {
> ...
>     if (window.ActiveXObject) {
> ...
>     } else if (window.XMLHttpRequest) {
> ...
>         if (is_chrome_safari || isNewIERV) {
>             var xhReq = new XMLHttpRequest();
>             xhReq.open("GET", url, false);
>             xhReq.send(null);
>             var PageContent = xhReq.responseXML.getElementsByTagName("PageContent");
>             if (PageContent != null || PageContent[0].firstChild.data != 'Not Valid') {
>                 PageContent = PageContent[0].firstChild.data;
>                 //document.getElementById(objID).innerHTML = '<div>Loading Page...</div>';
>                 resetScroll();
>                 setTimeout(function () {
>                     document.getElementById(objID).innerHTML = PageContent;
>                     if (canGetCookie) {
>                         getCookie(root + 'getCookie.aspx');
>                     }
>                 }, 0);
>             }
>         } else {
>             oLoadedXML = document.implementation.createDocument("", "", null);
>             oLoadedXML.async = false;
>             var loaded = oLoadedXML.load(url);

This code uses XMLDocument.prototype.load [1] that is non-standard and removed recently [2]

then, if I modify `if (is_chrome_safari || isNewIERV) {` line above to just `if (true) {`, it seems to work.

[1] https://developer.mozilla.org/en-US/docs/Web/API/XMLDocument/load
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=332175
(edited, to add URL)

https://www.ssfautoparts.com/assets/scripts/public-02122018.min.js
```
function LoadThisPage(objID, Page, root, loginContent, thisMenu, shopMenu, shopMenuTab, menuDisp) {
...
    if (window.ActiveXObject) {
...
    } else if (window.XMLHttpRequest) {
...
        if (is_chrome_safari || isNewIERV) {
            var xhReq = new XMLHttpRequest();
            xhReq.open("GET", url, false);
            xhReq.send(null);
            var PageContent = xhReq.responseXML.getElementsByTagName("PageContent");
            if (PageContent != null || PageContent[0].firstChild.data != 'Not Valid') {
                PageContent = PageContent[0].firstChild.data;
                //document.getElementById(objID).innerHTML = '<div>Loading Page...</div>';
                resetScroll();
                setTimeout(function () {
                    document.getElementById(objID).innerHTML = PageContent;
                    if (canGetCookie) {
                        getCookie(root + 'getCookie.aspx');
                    }
                }, 0);
            }
        } else {
            oLoadedXML = document.implementation.createDocument("", "", null);
            oLoadedXML.async = false;
            var loaded = oLoadedXML.load(url);
```

This code uses XMLDocument.prototype.load [1] that is non-standard and removed recently [2]

then, if I modify `if (is_chrome_safari || isNewIERV) {` line above to just `if (true) {`, it seems to work.

[1] https://developer.mozilla.org/en-US/docs/Web/API/XMLDocument/load
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=332175

Back to Bug 1565418 Comment 2