2010-11-18 7 views
2

jQuery를 사용하여 $ .get 요청을하고 있습니다.이 HTML로 인해 페이지가 비게됩니다.

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

응답 객체는 (다른 것들 중) 다음과 같은 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/[email protected]_CPRVB_2wCo_bvai" /> 
    // this URL is to an image on one of our internal servers 

문제가를 그 .html(result) 기능 후 파이어 폭스 나 크롬 (나는 방화범의 순 탭에서 볼 수 있듯이)와 실행하면 브라우저가 이미지를 가져 오기 위해 새로운 요구 사항을 시작합니다. 그러면 이미지가있는 화면의 새로운 HTML 렌더링 대신 브라우저에 빈 페이지가 표시됩니다.

누구나 이와 같은 문제가 발생 했습니까? 어떤 생각이 어떻게 해결할 수 있습니까?

편집 : 전체 응답 코드는 다음과 같다 :이 작업을 수행 할 때 새 문서를 생성하기 때문에 페이지가 완전히 나쁜 일이다 렌더링 후

<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 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/[email protected]_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> 
+1

응답 코드를 기입하십시오. json 문자열을 반환하는 것을 고려할 수도 있습니다. – Bob

+0

안녕하세요, 응답 코드를 게시했습니다. 감사합니다 – DaveDev

답변

1

는 document.write를 지내요. 그래서 귀하의 document.writeln 중 하나가 그 스크립트에서 실행되면 아마 당신의 페이지가 공백이 될 것입니다.

+0

입력 크리스 주셔서 감사합니다.하지만 왜 IE가 아닌 파이어 폭스와 함께 문제가 될 것이라고? – DaveDev

+0

음 ... 아주 좋은 질문입니다. 나는 그것을 보았고 즉시 생각했다. writelns를 꺼내거나 이미지를 꺼내면 어떤 차이가 있습니까? 또는 요청중인 페이지를 수정할 수있는 권한이 없습니까? – Chris

+0

반환되는 HTML은 타사 차트 서버에서 제공하므로'writeln' 함수를'$ ('body'). append'로 바꾸는 것 이외에는 아무 것도 할 수 없습니다. 그래도 나는 그 중 하나가 작동하지 않을 것이라고 생각하지 않습니다 – DaveDev

관련 문제