잘 되있긴 한데 첨부파일 한글 설정부분이랑
팝업에서 탭 컨트롤하는 부분이 좀 짜증난다는....

FCKEditor 2.3 버전입니다.
FCKEditor 2.3 버전입니다.
자바스크립트로 게시판 페이징구현한 파일입니다.
완벽하진 않고 약간의 버그가 있기는 하지만 수정해서 쓰셔요
prototype 형식으로 작성되어 있습니다.
Paging.js
/**
* =====================================================
* 리스트의 페이징 생성
* 페이징이 사용되는 곳
* 대회목록, 선수정보 > 선수목록
* @ Parameter
* target : 자바스크립트 함수 이름
* 페이징에서 링크가 클릭되었을 때 호출할 자스 함수이름
* totCnt : 전체 게시물 개수
* rowLimit : 한페이지에 보일 게시물 개수
* curPage : 현재 페이지
* @ Return
* 페이징되는 부분의 HTML TAG가 리턴됨
* =====================================================
*/
function createPaging(target, totCnt, rowLimit, curPage) {
var pagingObj = new Paging(target, totCnt, rowLimit, curPage);
var div = createDiv("Paging");
div.innerHTML = pagingObj.getPageString();
return div;
}
// 페이징을 추가한다.
contentsBody.appendChild(createPaging("moveGameList", 120, 10, 1));
자바스크립트로 URL을 parsing 하는 prototype
URLParser.js
URLParser.prototype = {
/**
* =====================================================
* 파라미터를 파싱한다.
* =====================================================
*/
parseParams: function() {
if(this.search=="" ||
this.search=="?" ||
this.search=="undefined" ||
this.search==null ||
this.search=="null")
return;
// 각각의 파라미터를 분해한다.
var item = null;
var param = null;
var tmp = this.search.substr(1);
var tmpArr = tmp.split("&");
if(tmpArr.length==0)
return;
// 분해한 각각의 파라미터 문자열을 KEY, VALUE로 분해한다.
for(var idx=0; idx<tmpArr.length; idx++) {
item = tmpArr[idx].split("=");
if(item.length!=2) {
alert("Incorrect Parameter - " + item);
continue;
}
param = new URLParameter(item[0], item[1]);
this.paramList[this.paramList.length] = param;
}
},
/**
* =====================================================
* 파싱된 파라미터를 쿼리 스트링으로 조합하여 리턴한다.
* =====================================================
*/
getParamString: function() {
var buf = "";
if(this.paramList.length==0)
return buf;
buf = "?";
for(var idx=0; idx<this.paramList.length; idx++) {
buf += this.paramList[idx].getString();
}
return buf;
},
/**
* =====================================================
* 전체 URL 문자열을 조합하여 리턴한다.
* =====================================================
*/
getFullString: function() {
var buf = "";
buf += this.getProtocol() + "//";
buf += this.getHost();
buf += this.getPort()=="" || this.getPort()==80 ? "" : ":" + this.getPort();
buf += this.getPathName();
buf += this.getParamString();
buf += this.getHash()=="" || this.getHash().length==0 ? "" : this.getHash();
return buf;
},
/**
* =====================================================
* 해당 Key값을 가지는 파라미터가 있는지 확인한다.
* =====================================================
*/
existParam: function(key) {
var result = false;
if(this.paramList.length==0)
return result;
for(var idx=0; idx<this.paramList.length; idx++) {
var param = this.paramList[idx];
if(param.getKey()==key) {
result = true;
break;
}
}
return result;
},
/**
* =====================================================
* 해당 Key값에 설정된 파라미터값을 리턴한다.
* =====================================================
*/
getParamValue: function(key) {
if(!this.existParam(key))
return "";
var result = "";
for(var idx=0; idx<this.paramList.length; idx++) {
var param = this.paramList[idx];
if(param.getKey()==key) {
result = param.getValue();
break;
}
}
return result;
},
/**
* =====================================================
* 각각의 필드값을 리턴
* =====================================================
*/
getHref: function() {
return this.href;
},
getProtocol: function() {
return this.protocol;
},
getHost: function() {
return this.host;
},
getHostName: function() {
return this.hostname;
},
getPort: function() {
return this.port;
},
getPathName: function() {
return this.pathname;
},
getSearch: function() {
return this.search;
},
getHash: function() {
return this.hash;
},
/**
* =====================================================
* 각각의 필드값을 셋팅
* =====================================================
*/
setHref: function(val) {
this.href = val;
},
setProtocol: function(val) {
this.protocol = val;
},
setHost: function(val) {
this.host = val;
},
setHostName: function(val) {
this.hostname = val;
},
setPort: function(val) {
this.port = val;
},
setPathName: function(val) {
this.pathname = val;
},
setSearch: function(val) {
this.search = val;
},
setHash: function(val) {
this.hash = val;
},
/**
* =====================================================
* URL 정보를 리턴한다.
* =====================================================
*/
debug: function() {
this.debugData = "";
this.debugData += "HREF : " + this.href + this.LF;
this.debugData += "PROTOCOL : " + this.protocol + this.LF;
this.debugData += "HOST : " + this.host + this.LF;
this.debugData += "HOSTNAME : " + this.hostname + this.LF;
this.debugData += "PORT : " + this.port + this.LF;
this.debugData += "PATHNAME : " + this.pathname + this.LF;
this.debugData += "SEARCH : " + this.search + this.LF;
this.debugData += "HASH : " + this.hash + this.LF;
return this.debugData;
}
}
URLParameter = function(key, value) {
this.key = key;
this.value = value;
}
URLParameter.prototype = {
/**
* =====================================================
* Key 값을 셋팅한다.
* =====================================================
*/
setKey: function(key) {
this.key = key;
},
/**
* =====================================================
* Key 값을 리턴한다.
* =====================================================
*/
getKey: function() {
return this.key;
},
/**
* =====================================================
* Value 값을 셋팅한다.
* =====================================================
*/
setValue: function(val) {
this.value = val;
},
/**
* =====================================================
* Value 값을 리턴한다.
* =====================================================
*/
getValue: function() {
return this.value;
},
/**
* =====================================================
* KEY=VALUE 문자열을 리턴한다.
* =====================================================
*/
getString: function() {
return this.key + "=" + this.value;
}
}
::: 사람과 사람의 교감! 人터넷의 첫 시작! 댓글을 달아주세요! :::