본문 바로가기

웹 개발

Google Analytics Script API 출처 : http://jsdo.it/nomotch/rMoU /** * */ //Load the Google data JavaScript client library. google.load('gdata', '2.x', {packages: ['analytics']}); //Load the Google Libraries jQuery and jQuery UI //google.load('jquery', '1.5.2'); //google.load('jqueryui', '1.8.12'); //Set the callback function when the library is ready. google.setOnLoadCallback(init); /** * This is called once the Google Data J..
XML에서 한글 읽어들이기. InputSource is = new InputSource(new InputStreamReader(new FileInputStream("test.xml"), "UTF-8")); 이렇게 하지 않으면 Element를 통해 읽어 들일때 end tag를 인식하지 못해 에러난다. 대략적 전체 코드. try { User user = null; InputSource is = new InputSource(new InputStreamReader(new FileInputStream(file), "UTF-8")); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); if(f..
JSF - executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@1ae6456) threw exception http://www.coderanch.com/t/414767/JSF/java/Faces-Exception-Hello-world-ish There is either a bug in the old JSF implementation or you configured the stuff the wrong way. First upgrade your JSF implementation to the latest available at their homepage (currently 1.2_10) and see if it solves the problem. If it doesn't, then please paste the new stacktrace here along with your faces-config.xml. 1.2 ..
Tomcat console encoding. Tomcat의 console encoding 변경 방법. 시스템 인코딩과 톰캣 인코딩이 안맞아서 로그가 다 깨져버리는 경우 Server side 언어가 분명 한글로 처리하여 DB에 쿼리를 날리는데 한글이 다 깨져서 날아가는 경우.. 1. window에서.. 해당 부분을 바꿔주면 된다. 또는 해당 부분에 직접 적어줘도 된다. -Dfile.encoding=euc-kr -Dclient.encoding.override=euc-kr 마찬 가지로 해당 부분에 아래 옵션을 넣어준다. -Dfile.encoding=euc-kr -Dclient.encoding.override=euc-kr 참조할만한 사이트 : http://quri.egloos.com/1589989
[Script] 특수문자 강제 치환. 특수문자 강제 치환하기. function removeSpCharacter( value ) { var specialChars='~`!@#$%%^&*-=+\|[{]};:\',,()/?'; var str = value; var i, j; if (str == '') return; for (i = 0; i < str.length; i++) { for (j = 0; j < specialChars.length; j++) { if (str.charAt(i) == specialChars.charAt(j)) str = str.replace(str.charAt(i), " "); } } return str; } jQuery로 만들기엔 너무 귀찮다..
.innerHTML 과 .html() 차이!! a. jQuery('#couponModal').innerHTML b. jQuery('#couponModal').html() b를 써야하는데 a를 쓰는 바람에 장장 12시간을 개 삽질 다 했다... 아나.. 이 두 가지의 차이점은 분명히 존재한다. 특히 nyroModalManual을 사용할 경우 innerHTML을 하게 되면 nyroModalManual이 두 번 열리게 되면 IE에서는 무조건 에러를 뱉어낸다. (events가 없다는 개소리를..) 하지만 html()로 div를 읽어 들이면 에러가 없다. 왜일까? 밤새고 나서 다시 연구해볼 문제... Ref : http://www.stainlessvision.com/jquery-html-vs-innerxhtml
(jQuery object).click 이 IE에서 안될 수 있다. jQuery('#nyroModalContent #btnRefundCouponBook').click( callback ~ 위 구문은 Firefox 및 chrome에서는 아무 이상 없다. 단 IE에서는 에러 뱉어낸다... 지원하지 않는 함수 입니다. 그럴땐 아래 처럼... jQuery('#nyroModalContent #btnRefundCouponBook').live('click', function(){ 설명은 간략하게 한다면 아래처럼 누군가가 해주었는데.. you could use one of jQuery's fancy plugins like liveQuery which monitors the DOM for changes and then re-assigns the event's function when y..
[Error] Component returned failure code: 0x80070057 cell editing 후 저장할때 발생한 에러인데 - ajax로 값을 넘기거나 호출하려고 해서 발생한다. url에 jsp, php, asp 등 request가 가능한 url은 가능한데, DWR로 해야한다면? 머리가 좀 복잡해진다... 해결후에 다시..