开发者

Why is this HTML causing the page to go blank

开发者 https://www.devze.com 2023-01-25 23:35 出处:网络
I\'m using jQuery to do a $.get request. $.get(url, {}, function (result) { $(\'#FactsheetTabs .tab_container div:visible\').fadeOut(100, function () {

I'm using jQuery to do a $.get request.

$.get(url, {}, function (result) {
        $('#FactsheetTabs .tab_container div:visible').fadeOut(100, function () {
            $('#FactsheetTabs .tab_container')
            .html(result)
            .fadeIn(100);
});

The response object contains (among other stuff) the following HTML:

<img 
    id="VB_2wCo_bvai" 
    name="VB_2wCo_bvai" 
    width="570" height="243" 
    style="border:0;" 
    usemap="#imVB_2wCo_bvai" 
    src="http://ie-sv-corda72:2001/?@_CPRVB_2wCo_bvai" /> 
    // this URL is to an image on one of our internal servers

The problem is that with Firefox or Chrome (as I can see in Firebug's Net tab), after the .html(result) function executes, the browser starts a brand new reqeust to get the image.. and this just results in a blank page showing up in the browser, rather than the new HTML rendering on the screen with the image.

Has anyone seen an issue like this before? Any idea how to resolve this?

Edit: The complete response code is as follows:

<script type="text/javascript">
    var put1006635006Props;
    var put1747344981Props;
    var put518384227Props;

    function getImageMap208345221() {
        put1006635006Props = new PopUpProperties;
        put1006635006Props.width = 400;
        put1006635006Props.textColor = "#000000";
        put1006635006Props.textSize = "12.0";
        put1006635006Props.textFont = "Helvetica";
        put1006635006Props.fillColor = "#ffffe1";
        put1006635006Props.borderColor = "#000000";
        put1006635006Props.hpos = LEFT;
        put1006635006Props.vpos = ABOVE;
        put1006635006Props.justification = "LEFT";
        put1747344981Props = new PopUpProperties;
        put1747344981Props.width = 400;
        put1747344981Props.textColor = "#000000";
        put1747344981Props.textSize = "12.0";
        put1747344981Props.textFont = "Helvetica";
        put1747344981Props.fillColor = "#ffffe1";
        put1747344981Props.borderColor = "#000000";
        put1747344981Props.hpos = CENTER;
        put1747344981Props.vpos = ABOVE;
        put1747344981Props.justification = "LEFT";
        put518384227Props = new PopUpProperties;
        put518384227Props.width = 400;
        put518384227Props.textColor = "#000000";
        put518384227Props.textSize = "12.0";
        put518384227Props.textFont = "Helvetica";
        put518384227Props.fillColor = "#ffffe1";
        put518384227Props.borderColor = "#000000";
        put518384227Props.hpos = RIGHT;
        put518384227Props.vpos = ABOVE;
        put518384227Props.justification = "LEFT";

        document.writeln('<map name="imVB_2wCo_bvai" id="imVB_2wCo_bvai"><area shape="poly" coords="540,52,547,52,547,59,540,59,540,52" onmouseover="return showPopUp ? showPopUp(put1006635006Props, \'VB_2wCo_bvai\', \'Schroder All Mats Idx Lnkd Bd I Acc 2.58%\', 543, 49) : false;"/><area shape="poly" coords="497,41,504,41,504,48,497,48,497,41" onmouseover="return showPopUp ? showPopUp(put1747344981Props, \'VB_2wCo_bvai\', \'Schroder All Mats Idx Lnkd Bd I Acc 3.27%\', 500, 38) : false;"/><area shape="poly" coords="454,49,461,49,461,56,454,56,454,49" onmouseover="return showPopUp ? showPopUp(put1747344981Props, \'VB_2wCo_bvai\', \'Schroder All Mats Idx Lnkd Bd I Acc 2.77%\', 457, 46) : false;"/><area shape="poly" coords="411,76,418,76,418,83,411,83,411,76" onmouseover="return showPopUp ? showPopUp(put1747344981Props, \'VB_2wCo_bvai\', \'Schroder All Mats Idx Lnkd Bd I Acc 1.14%\', 414, 73) : false;"/><area shape="poly" coords="368,98,375,98,375,105,368,105,368,98" onmouseover="return showPopUp ? showPopUp(put1747344981Props, \'VB_2wCo_bvai\', \'Schroder All Mats Idx Lnkd Bd I Acc -0.2%\', 371, 95) : false;"/><area shape="poly" coords="325,91,332,91,332,98,325,98,325,91" onmouseover="return showPopUp ? showPopUp(put1747344981Props, \'VB_2wCo_bvai\', \'Schroder All Mats Idx Lnkd Bd I Acc 0.25%\', 328, 88) : false;"/><area shape="poly" coords="281,108,288,108,288,115,281,115,281,108" onmouseover="return showPopUp ? showPopUp(put1747344981Props, \'VB_2wCo_bvai\', \'Schroder All Mats Idx Lnkd Bd I Acc -0.79%\', 284, 105) : false;"/><area shape="poly" coords="238,106,245,106,245,113,238,113,238,106" onmouseover="return showPopUp ? showPopUp(put1747344981Props, \'VB_2wCo_bvai\', \'Schroder All Mats Idx Lnkd Bd I Acc -0.69%\', 241, 103) : false;"/><area shape="poly" coords="195,120,202,120,202,127,195,127,195,120" onmouseover="return showPopUp ? showPopUp(put1747344981Props, \'VB_2wCo_bvai\', \'Schroder All Mats Idx Lnkd Bd I Acc -1.49%\', 198, 117) : false;"/><area shape="poly" coords="152,160,159,160,159,167,152,167,152,160" onmouseover="return showPopUp ? showPopUp(put1747344981Props, \'VB_2wCo_bvai\', \'Schroder All Mats Idx Lnkd Bd I 开发者_JS百科Acc -3.96%\', 155, 157) : false;"/><area shape="poly" coords="109,97,116,97,116,104,109,104,109,97" onmouseover="return showPopUp ? showPopUp(put1747344981Props, \'VB_2wCo_bvai\', \'Schroder All Mats Idx Lnkd Bd I Acc -0.15%\', 112, 94) : false;"/><area shape="poly" coords="66,92,73,92,73,99,66,99,66,92" onmouseover="return showPopUp ? showPopUp(put1747344981Props, \'VB_2wCo_bvai\', \'Schroder All Mats Idx Lnkd Bd I Acc 0.2%\', 69, 89) : false;"/><area shape="poly" coords="23,95,30,95,30,102,23,102,23,95" onmouseover="return showPopUp ? showPopUp(put518384227Props, \'VB_2wCo_bvai\', \'Schroder All Mats Idx Lnkd Bd I Acc 0%\', 26, 92) : false;"/><area shape="rect" coords="0,0,570,570" onmouseover="return hidePopUp ? hidePopUp() : false;"/></map>');
    }
</script>
<script type="text/javascript">
    <!-- Check to see if the jsPopUp code is already included
    if(typeof jsPopUp == 'undefined') {
        document.writeln('<script type="text/javascript" src="http://ie-sv-corda72:2001/?jsPopUp"></scr'+'ipt>');
    }
    if(document.layers) getImageMap208345221();
    //-->
</script>
<img 
    id="VB_2wCo_bvai" 
    name="VB_2wCo_bvai" 
    width="570" height="243" 
    style="border:0;" 
    usemap="#imVB_2wCo_bvai" 
    src="http://ie-sv-corda72:2001/?@_CPRVB_2wCo_bvai" />
<script type="text/javascript">
    if (!document.layers) getImageMap208345221();
</script>
<noscript>
    <map name="imVB_2wCo_bvai" id="imVB_2wCo_bvai">
        <area shape="poly" coords="540,52,547,52,547,59,540,59,540,52" alt="Schroder All Mats Idx Lnkd Bd I Acc 2.58%" />
        <area shape="poly" coords="497,41,504,41,504,48,497,48,497,41" alt="Schroder All Mats Idx Lnkd Bd I Acc 3.27%" />
        <area shape="poly" coords="454,49,461,49,461,56,454,56,454,49" alt="Schroder All Mats Idx Lnkd Bd I Acc 2.77%" />
        <area shape="poly" coords="411,76,418,76,418,83,411,83,411,76" alt="Schroder All Mats Idx Lnkd Bd I Acc 1.14%" />
        <area shape="poly" coords="368,98,375,98,375,105,368,105,368,98" alt="Schroder All Mats Idx Lnkd Bd I Acc -0.2%" />
        <area shape="poly" coords="325,91,332,91,332,98,325,98,325,91" alt="Schroder All Mats Idx Lnkd Bd I Acc 0.25%" />
        <area shape="poly" coords="281,108,288,108,288,115,281,115,281,108" alt="Schroder All Mats Idx Lnkd Bd I Acc -0.79%" />
        <area shape="poly" coords="238,106,245,106,245,113,238,113,238,106" alt="Schroder All Mats Idx Lnkd Bd I Acc -0.69%" />
        <area shape="poly" coords="195,120,202,120,202,127,195,127,195,120" alt="Schroder All Mats Idx Lnkd Bd I Acc -1.49%" />
        <area shape="poly" coords="152,160,159,160,159,167,152,167,152,160" alt="Schroder All Mats Idx Lnkd Bd I Acc -3.96%" />
        <area shape="poly" coords="109,97,116,97,116,104,109,104,109,97" alt="Schroder All Mats Idx Lnkd Bd I Acc -0.15%" />
        <area shape="poly" coords="66,92,73,92,73,99,66,99,66,92" alt="Schroder All Mats Idx Lnkd Bd I Acc 0.2%" />
        <area shape="poly" coords="23,95,30,95,30,102,23,102,23,95" alt="Schroder All Mats Idx Lnkd Bd I Acc 0%" />
    </map>
</noscript>


Doing a document.write after the page has fully rendered is a bad thing since it will create a new document when you do this. So if any of your document.writeln get executed in that script then that is probably causing your page to be blanked.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号