본문 바로가기

전체56

div contenteditable=true에 데이트피커 넣기 div에 $("div").datepicker()를 하게 되면, div안에 datepicker가 생성된다.나 를 사용하지 않고 div로 datepicker를 쓰려면 다음과 같이 쓰면 사용 할 수 있다... 예시이미지 .jsp 12 cs .javascript123456789function fnDivToInputDatepicker(e){ var data = $(e); var datepi = data["0"].nextElementSibling; $(datepi).datepicker(); $(datepi).datepicker('option',{ onClose: function(dateText, inst){$(data).html(dateText);} }); $(datepi).datepicker("show");}Co.. 2016. 9. 5.
jqGrid Cell Edit 벗어나기 jqGrid에서 CellEdit 모드 일 때 마우스가 Input에서 focus를 벗어 났을 때 Cell Save가 일어나게 해보자. .js 12345afterEditCell:function(rowid, cellname, value, iRow, iCol){ $("#"+rowid+"_"+cellname).blur(function(){ $("#grid").jqGrid("saveCell",iRow,iCol); });},Colored by Color Scriptercs 이렇게 하면 input 에서 focus를 잃었을 때 SaveCell이 실행된다. * Cell이 datepicker라면 적용하면 안된다. if문으로 예외를 주어야 한다. datepicker는 다른 방법을 해야한다. 2016. 9. 1.
jqGrid옵션 정리, jqGrid Options 中 *현재 페이지는 번역이 아닙니다. jqGrid를 사용하면서 느꼈던 특징 등을 작성한 것입니다. http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options PropertyTypeDescriptionDefault1)Can be changed?ajaxGridOptionsobjectThis option allows to set global ajax settings for the grid when requesting data. Note that with this option it is possible to overwrite all current ajax settings in the grid including the error, complete and beforeSen.. 2016. 9. 1.
PDF파일 보여주기->출력 PDF파일을 브라우저에 보여주는 방법... chrome의 경우기본적으로 PDF viewer를 제공해주기 때문에 PDF파일을 base64로 변환하여 리턴 해주면, javascript 1window.open("data:application/pdf;base64, " + vjData.base64EncodedPDF);cs 이렇게 해주면 새 창으로 PDF를 볼 수 있습니다. IE의 경우브라우저에서 PDF viewer를 기본으로 제공해주지 않습니다.PDF를 볼 수 있는 프로그램(예:Acrobat Reader DC)를 설치하면 브라우저에서도 볼 수 있지만, Data URI를 지원하지도 않기 때문에 다른 방법으로 봐야 합니다. 몇 가지 방법을 찾던 도중에... java 12345678910byte[] fileByte =.. 2016. 7. 29.