자바스크립트 고수님 ㅠㅠ 좀 도와주세요 웹페이지 출력

잘 쓰던 프로그램인데요

요즘 브라우저 마다 보안도 강화되고 업데이트가 되서인지

며칠 전 부터 웹페이지를 출력하는 창이 뜨질 않네요 ㅠㅠ

손댄거 하나 없는데 말이죠 ㅠㅠ

 

웨일, 크롬 브라우저에서 F12로 콘솔 확인 하니 이런문구가 나오면서

Uncaught TypeError: Cannot set properties of undefined (setting 'header')
    at f_print (popup_vocabulary.php:26:33)
    at <anonymous>:1:1

 

프린트창이 뜨질 안네요

 

엑티브엑스 쓰다가 설치방식으로 바꾸고 반대로도 해보고 현재 소스는 수정중입니다만

자바스크립트 변수나 뭐 그런 문제이지 않을까?? 싶기도 하고 그렇습니다.

 

이 부분 소스는 

 

 

Copy
<object id="factory" style="DIsPLAY:none;" codeBase="/common/smsx.cab#Version=7,7,0,20" classid="clsid:1663ed61-23eb-11D2-b92f-008048fdd814" viewastext></object>

 

<script type="text/javascript">

    function f_print()     {

       $('printNone').style.display = "none";

        factory.printing.header = "테스트1";           //머리글설정
        factory.printing.footer = "테스트2";             //꼬리글설정
        factory.printing.topMargin = 15;          //상여백
        factory.printing.bottomMargin = 5;     //하여백
        factory.printing.leftMargin = 5;          //좌여백
        factory.printing.rightMargin = 5;        //우여백
        factory.printing.Print(true);             //프린트 실행 false하면:프린트 설정화면 안보여짐 true하면: 보여짐

    }

</script>

<div id="printNone">
  <br />
  <br />
  <table width="760" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height="30" align="right" valign="top" style="padding-right: 30px"><a href="javascript:f_print()"><img src="/common/images/btn_print_02.gif" width="69" height="19" border="0" /></a></td>
    </tr>
  </table>
  </div>
  <div id="printNm">
|

답변 2개

URL을 올려 보세요

$('printNone')
$('#printNone')

이렇게 아이디 표시 #추가해서 해보세요

factory.printing.header

팩토리에 대한 정의가 어디서 오는 것인지 잘 모르겠습니다.

답변을 작성하려면 로그인이 필요합니다.