XE버그인지 모르겠습니다. 아래 도움을 받아 exec_json을 사용하여 모듈의 함수가 실행되고 함수에서 보내는 콜백을 잘 처리할 수 있게 되었습니다.
그런데 안드로이드 크롬의 경우 응답 값 출력이 안됩니다.
ajax관련 문서에서는 async :false 관련 내용도 보입니다.
혹시 exec_json에서도 같은 옵션 사용이 가능한가요?
PHP | PHP 7.1 |
---|---|
CMS | XpressEngine |
XE버그인지 모르겠습니다. 아래 도움을 받아 exec_json을 사용하여 모듈의 함수가 실행되고 함수에서 보내는 콜백을 잘 처리할 수 있게 되었습니다.
그런데 안드로이드 크롬의 경우 응답 값 출력이 안됩니다.
ajax관련 문서에서는 async :false 관련 내용도 보입니다.
혹시 exec_json에서도 같은 옵션 사용이 가능한가요?
<script> jQuery(document).ready(function($) { if(window.exec_json === void 0) { alert('exec_json function is missing.'); } if(!jQuery('.pointplus_dog114').length) { alert('No node found.'); } jQuery('.pointplus_dog114').click(function() { alert('click'); exec_json('portalpoint.dispPortalpointIndex', { title: 'pointplus_dog114' }, function(response) { alert(response); }, function(error){ alert('Error: '+error); }); }); }); </script>
일단 테스트 값을 저렇게 해보시구 어느 과정에서 찐빠가 났는지 체크해보시면 될 것 같습니다.
만약 아무런 알림창이 뜨지 않는다면 jquery가 빠졌을 가능성도 있습니다.
사이트에 있는
$('.pointplus_dog114').click(function () { exec_json('portalpoint.dispPortalpointIndex',{title:'pointplus_dog114'},function(response) {$("#result_message").html(response.result_message);$('#result_message').show();}); });
위 코드는 제거하시고
(function($){ $(document).on('click', '.pointplus_dog114', function(){ var $this = $(this); var href = $this.attr('href'); window.exec_json('portalpoint.dispPortalpointIndex', { title: 'pointplus_dog114' }, function(response) { alert('RetrievedData:' + response); if(href) { window.setTimeout(function(){ window.open(href); }, 0); } }, function(error){ alert('Error: '+error); }); return false; }); })(window.jQuery);
이걸로 대처하세요.
예제로 제시해주신
https://xetown.com/questions/1223663#comment_1223845
고급메일발송모듈에서 안드로이드 크롬에서 테스트 메일을 발송해 보면 결과 메시지가 출력이 됩니다. 여기에서는 alert이 아닌 레이어로 가려졌던 영역이 노출되면서 보이게 처리 한 듯 합니다.