간단한 원인 : 엉뚱한 곳에서 빈 줄이 출력되었다.

원인 : 
  • 엉뚱한 곳에서 (보통 xe/files/config/config.user.inc.php 에서 실수함) 빈 줄이 추가됨
  • 실제로 날라오는 XML자료의 첫 번째 줄에 <response>가 나타나지 않고 빈 줄이 추가됨
  • xml을 처리한 javascript상에서 xml이 아닌 일반 메시지로 판단 
    (정규식에 의해 첫 번째에 <response>가 나타나면 xml로 파싱해서 처리하고 그렇지 않으면 일반 메시지로 판단
    앞에 새 줄(\n)이 있으므로 /^<response>/에 해당하지 않으므로 일반 메시지로 판단됨)
  • 해당 경고 메시지가 뜬다
추가 : 이런 경우는 보통 __OB_GZHANDLER_ENABLE__ 을 활성화 하면 에러남
  • 메시지 내용은 header상에서는 압축되었다고 했으나, 정작 메시지 내용은 압축된 자료 앞에 \n이 추가되어됨
  • 브라우저상에서 정상적인 압축 자료로 인식하지 못하고 지원하지 않는 인코딩이라는 창이 뜸

해결 방법 : 엉뚱한 빈 줄을 찾아야 된다. (output buffering 기능을 끄면 header전에 출력되는곳을 알 수 있으나 정작 어디서 꺼야될지는 정확하게 모르겠다.) 일단 xe/files/config/config.user.inc.php에 빈 줄이 있는 지 (특히 <? 앞이나 ?> 뒤에 확인할 것) 확인한다.


Posted by Parker Falcon
관리자 페이지로 들어가셔서 모듈들의 업데이트를 해주세요. (특히 위젯 모듈)

( http://홈페이지주소/?module=admin )

혹여나 그래도 안된다면 files/cache폴더를 다른 이름으로 잠시 바꾼 다음

제대로 작동하는 것을 확인하시고, 홈페이지의 모든 기능이 정상적으로 작동한다면 새로 생긴 cache폴더는 그대로 두고

임시로 이름을 바꾼 cache폴더는 삭제하셔도 됩니다.


Posted by Parker Falcon
jQuery를 이용했습니다.

응용하면 없이도 가능합니다.


키포인트는,

  Opener의 문서
Option 객체 생성
Opener에 객체 생성
 IE  window.opener.document  document.createElement('option')  window.opener.document.createElement('option')
 Non-IE  opener.document  new Option
 new Option(?)



function registerComponentToKiosk() {
    var resultList = document.getElementById('componentSelect');
    var moduleName = document.getElementById('module_name').value;

    var result_srl = resultList.value;
    var resultText = resultList.options[resultList.selectedIndex].text;

   
   
    try { // IE 왕따
        var targetList = $('#kiosk_component_list', window.opener.document)[0];
        for (var i = 0; i < targetList.length; i++) {
            if (targetList.options[i].value == result_srl) {
                alert ('같은 부품이 있습니다.');
                return false;
            }
        }
        var targetObj = window.opener.document.createElement('option');
        targetObj.text = moduleName + ' - ' + resultText;
        targetObj.value = result_srl;
        targetList.add (targetObj);
    } catch (ex) { // 기타 다른 브라우져
        var targetList = $('#kiosk_component_list', opener.document);
        if ($('#kiosk_component_list > option[value=' + result_srl + ']').length > 0) {
            alert ('같은 부품이 있습니다.');
            return false;
        }
        targetList.addOption(result_srl, moduleName + ' - ' + resultText );
    }
    window.close();
}
Posted by Parker Falcon