/** * [changePage] * @param url String * when you click button (first,prev,next,last) , will call this function */ function changePage(url) { try { var flg = doBeforeChangePage(url) ; if ( !(flg==true || flg=='true') ) { return ; } } catch (e) { alert("Exception : "+e.message) ; return ; } window.location.href = encodeURI(url); } //+++++++++++++++++++++++++++++++++++++++++++++++++++++ // // Abstract Method // you should overwrite that codes in your page // //+++++++++++++++++++++++++++++++++++++++++++++++++++++ /** * [doBeforeChangePage] * * @param url String * @return boolean * do something before change page */ function doBeforeChangePage(url) { return true ; } /* template code var changed = false ; function doBeforeChangePage(url) { if (changed) { var flg = confirm("did you want change page ??") ; if (!flg) return false ; } return true ; } */ /** * [writeHtml] * * create 'Add' button in title */ function writeHtml() { // this is sample !! var addBtnStr = "" ; document.write(addBtnStr) ; } function eBizShowInfoTag(page,sum,count,allPage){ var page=page; var sum=sum; var count=count; var index=page-1; var from; var to=page*count; var allpage=allPage; if(index ==0){from=1}else{from=index*count;} if(page==allPage){to=sum; from=(sum-count)+1;} //var sring="Displaying "+from+" - "+to+" of "+sum; document.write("Displaying "+from+" - "+to+" of "+sum); }