묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
내용을 현재창으로 띄우는 방법좀 부탁드립니다.[노프레임]
2006.06.11 18:11
간단한 트리구조 메뉴 스크립트를 사용했는데요.
메뉴를 클릭하면 새창으로 떠버리네요. ㅡㅜ
현재창으로 뜨게 하려면 어떻게 해야 하는지 모르겠습니다.
도움 부탁드릴께요.
아래 소스 올립니다.
** 노프레임 홈입니다.
============================================================================================================================
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=euc-kr">
<style type="text/css">
A:link {color: #000000; text-decoration: none}
A:visited {color: #000000; text-decoration: none}
A:hover {color: #dddddd; text-decoration: none}
BODY,TR,TD,INPUT{font-size:9pt;font-family:Verdana,굴림}
</STYLE>
<script language="JavaScript" type="text/javascript">
function Folder(folderDescription, hreference) { //constructor
//constant data;
this.desc = folderDescription;
this.hreference = hreference;
this.id = -1;
this.navObj = 0;
this.iconImg = 0;
this.nodeImg = 0;
this.isLastNode = 0;
// dynamic data
this.isOpen = true;
this.iconSrc = "img/ftv2folderopen.gif";
this.children = new Array;
this.nChildren = 0;
// methods
this.initialize = initializeFolder;
this.setState = setStateFolder;
this.addChild = addChild;
this.createIndex = createEntryIndex;
this.hide = hideFolder;
this.display = display;
this.renderOb = drawFolder;
this.totalHeight = totalHeight;
this.subEntries = folderSubEntries;
this.outputLink = outputFolderLink;
}
function Folder2(folderDescription, hreference) { //constructor
//constant data;
this.desc = folderDescription;
this.hreference = hreference;
this.id = -1;
this.navObj = 0;
this.iconImg = 0;
this.nodeImg = 0;
this.isLastNode = 0;
// dynamic data
this.isOpen = true;
this.iconSrc = "img/ftv2folderopen.gif";
this.children = new Array;
this.nChildren = 0;
// methods
this.initialize = initializeFolder;
this.setState = setStateFolder;
this.addChild = addChild;
this.createIndex = createEntryIndex;
this.hide = hideFolder;
this.display = display;
this.renderOb = drawFolder;
this.totalHeight = totalHeight;
this.subEntries = folderSubEntries;
this.outputLink = outputFolderLink2;
}
function setStateFolder(isOpen) {
var subEntries;
var totalHeight;
var fIt = 0;
var i = 0;
if(isOpen == this.isOpen)
return
if(browserVersion == 2) {
totalHeight = 0
for(i = 0; i < this.nChildren; i++)
totalHeight = totalHeight + this.children[i].navObj.clip.height;
subEntries = this.subEntries();
if(this.isOpen)
totalHeight = 0 - totalHeight;
for(fIt = this.id + subEntries + 1; fIt < nEntries; fIt++)
indexOfEntries[fIt].navObj.moveBy(0, totalHeight);
}
this.isOpen = isOpen;
propagateChangesInState(this);
}
function propagateChangesInState(folder) {
var i=0
if (folder.isOpen) {
if (folder.nodeImg)
if (folder.isLastNode)
folder.nodeImg.src = "images/click_10.gif"
else
folder.nodeImg.src = "images/click_7.gif"
for (i=0; i<folder.nChildren; i++)
folder.children[i].display()
} else {
if (folder.nodeImg)
if (folder.isLastNode)
folder.nodeImg.src = "images/click_10.gif"
else
folder.nodeImg.src = "images/click_8.gif"
for (i=0; i<folder.nChildren; i++)
folder.children[i].hide()
}
}
function hideFolder() {
if(browserVersion == 1) {
if(this.navObj.style.display == "none")
return
this.navObj.style.display = "none"
}
else {
if(this.navObj.visibility == "hiden")
return
this.navObj.visibility = "hiden"
}
this.setState(0)
}
function initializeFolder(level, lastNode, leftSide) {
var i = 0;
var j = 0;
var numberOfFolders;
var numberOfDocs;
var nc;
nc = this.nChildren;
this.createIndex();
var auxEv = "";
if(browserVersion > 0)
auxEv = "<a href='javascript:clickOnNode("+this.id+")'>"
else
auxEv = "<a>"
if(level > 0) {
if(lastNode) { //the last 'brother' in the children array
this.renderOb(leftSide + auxEv + "<img name='nodeIcon" + this.id + "'src='images/aa.gif' width=16 height=22 border=0></a>");
leftSide = leftSide + "<img src='images/ftv2blank.gif' width=16 height=22>";
this.isLastNode = 1;
}
else {
this.renderOb(leftSide + auxEv + "<img name='nodeIcon" + this.id + "' src='images/ftv2mnode.gif' width=16 height=22 border=0></a>");
leftSide = leftSide + "<img src='images/click_9.gif' width=16 height=22>";
this.isLastNode = 0;
}
}
else
this.renderOb("");
if(nc > 0) {
level = level + 1;
for(i = 0; i < this.nChildren; i++) {
if(i == this.nChildren-1)
this.children[i].initialize(level, 1, leftSide);
else
this.children[i].initialize(level, 0, leftSide);
}
}
}
function drawFolder(leftSide) {
if (browserVersion == 2) {
if (!doc.yPos)
doc.yPos=8
doc.write("<layer id='folder" + this.id + "' top=" + doc.yPos + " visibility=hiden>")
}
doc.write("<table ")
if (browserVersion == 1)
doc.write(" id='folder" + this.id + "' style='position:block;' ")
doc.write(" border=0 cellspacing=0 cellpadding=0>")
doc.write("<tr><td>")
doc.write(leftSide)
this.outputLink()
doc.write("</a>")
doc.write("</td><td nowrap>")
doc.write("<DIV CLASS="fldrroot">");
if (USETEXTLINKS) {
this.outputLink()
doc.write(this.desc + "</a>")
}
else
doc.write(this.desc)
doc.write("</DIV>");
doc.write("</td>")
doc.write("</table>")
if (browserVersion == 2) {
doc.write("</layer>")
}
if (browserVersion == 1) {
this.navObj = doc.all["folder"+this.id]
this.iconImg = doc.all["folderIcon"+this.id]
this.nodeImg = doc.all["nodeIcon"+this.id]
} else if (browserVersion == 2) {
this.navObj = doc.layers["folder"+this.id]
this.iconImg = this.navObj.document.images["folderIcon"+this.id]
this.nodeImg = this.navObj.document.images["nodeIcon"+this.id]
doc.yPos=doc.yPos+this.navObj.clip.height
}
}
function outputFolderLink() {
if (this.hreference) {
doc.write("<a href='" + this.hreference + "' TARGET="detail" ")
if (browserVersion > 0)
doc.write("onClick='javascript:clickOnFolder("+this.id+")'")
doc.write(">")
}
else
doc.write("<a href='javascript:clickOnFolder("+this.id+")'>")
}
function outputFolderLink2() {
if (this.hreference) {
doc.write("<a href='" + this.hreference + "' TARGET="detail" ")
if (browserVersion > 0)
doc.write("onClick='javascript:clickOnFolder("+this.id+")'")
doc.write(">")
}
else
doc.write("<a href='javascript:clickOnFolder("+this.id+")'>")
}
function addChild(childNode) {
this.children[this.nChildren] = childNode
this.nChildren++
return childNode
}
function folderSubEntries() {
var i = 0
var se = this.nChildre
for (i=0; i < this.nChildren; i++){
if (this.children[i].children) //is a folder
se = se + this.children[i].subEntries()
}
return se
}
function Item(itemDescription, itemLink, itemImg) { // Constructor
// constant data
this.desc = itemDescription
this.link = itemLink
this.id = -1 //initialized in initalize()
this.navObj = 0 //initialized in render()
this.iconImg = 0 //initialized in render()
// iconSrc에 지정되는 이미지 파일을 각 아이템에 맞게 지정할 수 있도록 한다 (목표)
this.iconSrc = itemImg;
// methods
this.initialize = initializeItem
this.createIndex = createEntryIndex
this.hide = hideItem
this.display = display
this.renderOb = drawItem
this.totalHeight = totalHeight
}
function hideItem() {
if (browserVersion == 1) {
if (this.navObj.style.display == "none")
return
this.navObj.style.display = "none"
} else {
if (this.navObj.visibility == "hiden")
return
this.navObj.visibility = "hiden"
}
}
function initializeItem(level, lastNode, leftSide) {
this.createIndex()
if (level>0)
if (lastNode) { //the last 'brother' in the children array
this.renderOb(leftSide + "<img src='images/click_1.gif' width=16 height=22>")
leftSide = leftSide + "<img src='images/click_2.gif' width=16 height=22>"
} else {
this.renderOb(leftSide + "<img src='images/click_3.gif' width=16 height=22>")
leftSide = leftSide + "<img src='images/click_4.gif' width=16 height=22>"
}
else
this.renderOb("")
}
function drawItem(leftSide) {
if (browserVersion == 2)
doc.write("<layer id='item" + this.id + "' top=" + doc.yPos + " visibility=hiden>")
doc.write("<table ")
if (browserVersion == 1)
doc.write(" id='item" + this.id + "' style='position:block;' ")
doc.write(" border=0 cellspacing=0 cellpadding=0>")
doc.write("<tr><td>")
doc.write(leftSide)
if(this.link != "")
doc.write("<a href=" + this.link + ">")
if(this.link != "")
doc.write("</a>")
doc.write("</td><td nowrap>")
doc.write("<DIV CLASS="fldritem">");
if (USETEXTLINKS) {
if(this.link != "")
doc.write("<a href=" + this.link + "onMouseOver=javascript:window.status='';return true;" + ">" + this.desc + "</a>")
else
doc.write(this.desc)
} else {
doc.write(this.desc)
}
doc.write("</DIV>");
doc.write("</table>")
if (browserVersion == 2)
doc.write("</layer>")
if (browserVersion == 1) {
this.navObj = doc.all["item"+this.id]
this.iconImg = doc.all["itemIcon"+this.id]
} else if (browserVersion == 2) {
this.navObj = doc.layers["item"+this.id]
this.iconImg = this.navObj.document.images["itemIcon"+this.id]
doc.yPos=doc.yPos+this.navObj.clip.height
}
}
function display() {
if (browserVersion == 1)
this.navObj.style.display = "block"
else
this.navObj.visibility = "show"
}
function createEntryIndex() {
this.id = nEntries
indexOfEntries[nEntries] = this
nEntries++
}
// total height of subEntries open
function totalHeight() { //used with browserVersion == 2
var h = this.navObj.clip.height
var i = 0
if (this.isOpen) //is a folder and _is_ open
for (i=0 ; i < this.nChildren; i++)
h = h + this.children[i].totalHeight()
return h
}
// Events
// *********************************************************
function clickOnFolder(folderId) {
var clicked = indexOfEntries[folderId]
clickOnNode(folderId)
}
function clickOnNode(folderId) {
var clickedFolder = 0
var state = 0
clickedFolder = indexOfEntries[folderId]
state = clickedFolder.isOpen
clickedFolder.setState(!state) //open<->close
window.focus(0)
}
function initializeDocument() {
if(doc.all)
browserVersion = 1; //IE4
else if(doc.layers)
browserVersion = 2; //NS4
else
browserVersion = 0; //other
foldersTree.initialize(0, 1, "");
foldersTree.display();
if(browserVersion > 0) {
doc.write("<layer top="+indexOfEntries[nEntries-1].navObj.top+"> </layer>");
// close the whole tree
clickOnNode(0)
// open the root folder
clickOnNode(0)
}
}
// Auxiliary Functions for Folder-Treee backward compatibility
// *********************************************************
function gFldr(description, hreference) {
folder = new Folder(description, hreference);
return folder;
}
function gFldr2(description, hreference) {
folder2 = new Folder2(description, hreference);
return folder2;
}
function gLnk(target, description, linkData, itemImg) {
fullLink = ""
if (target==0) {
if(linkData != "")
fullLink = "'"+linkData+"' target="detail""
else
fullLink = "";
} else {
if (target==1) {
if(linkData != "")
fullLink = "'"+linkData+"' target="_top""
else
fullLink = "";
} else if(target==3){
if(linkData != "")
fullLink = "'"+linkData+"' target="_new""
else
fullLink = "";
} else { // target == 2
if(linkData != "")
fullLink = "'http://"+linkData+"' target="detail""
else
fullLink = "";
}
}
linkItem = new Item(description, fullLink, itemImg)
return linkItem
}
function insFldr(parentFolder, childFolder) {
return parentFolder.addChild(childFolder)
}
function insDoc(parentFolder, document) {
parentFolder.addChild(document)
}
// Global variables
// ****************
USETEXTLINKS = 1;
indexOfEntries = new Array;
nEntries = 0;
doc = document;
browserVersion = 0;
selectedFolder=0;</script>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<TABLE WIDTH="1024" cellpadding="0" cellspacing="0">
<TR>
<TD width="1024" colspan="4">
<IMG SRC="images/index_1.gif" WIDTH=1024 HEIGHT=177 ALT=""></TD>
</TR>
<TR>
<TD width="211" height="51" bordercolor="#999999" bordercolorlight="#999999" align="center" valign="middle" colspan="3">
<p>
</p>
</TD>
<td width="813" height="51" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/index_8.gif">
<p><? print_outlogin("dc_outlogin", 1, 10) ?></p></td>
</TR>
<TR>
<td width="15" height="14" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_1.gif"> </td>
<td width="180" height="14" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_2.gif"> </td>
<td width="16" height="14" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_3.gif"> </td>
<td width="813" height="14" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999"> </td>
</TR>
<TR>
<td width="15" height="301" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_4.gif"> </td>
<td width="180" height="301" align="left" valign="top" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_5.gif"> <p>
<script language="JavaScript">
foldersTree = gFldr("<B>main menu</B>", "")
aux1 = insFldr(foldersTree, gFldr("<B>Home</B>", "http://www.worldkic.com", ""));
aux1 = insFldr(foldersTree, gFldr("introduce", ""));
insDoc(aux1, gLnk(0, "profile", "http://rcnkic.dungg.com/bbs/zboard.php?id=profile", ""))
insDoc(aux1, gLnk(0, "diary", "http://rcnkic.dungg.com/bbs/zboard.php?id=diary", ""))
insDoc(aux1, gLnk(0, "admin", "http://rcnkic.dungg.com/bbs/zboard.php?id=admin", ""))
aux1 = insFldr(foldersTree, gFldr("board", ""))
insDoc(aux1, gLnk(0, "notice", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_notice", ""))
insDoc(aux1, gLnk(0, "freeboard", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_free", ""))
insDoc(aux1, gLnk(0, "gag", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_gag", ""))
insDoc(aux1, gLnk(0, "essay", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_esay", ""))
insDoc(aux1, gLnk(0, "game", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_game", ""))
aux1 = insFldr(foldersTree, gFldr("gallery", ""))
insDoc(aux1, gLnk(0, "인물", "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_man", ""))
insDoc(aux1, gLnk(0, "풍경", "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_poong", ""))
insDoc(aux1, gLnk(0, "접사" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_zoom", ""))
insDoc(aux1, gLnk(0, "모델" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_model", ""))
insDoc(aux1, gLnk(0, "행사" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_event", ""))
insDoc(aux1, gLnk(0, "누드" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_nude", ""))
insDoc(aux1, gLnk(0, "회원투고" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_member", ""))
insDoc(aux1, gLnk(0, "엽기" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_yub", ""))
insDoc(aux1, gLnk(0, "기타" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_etc", ""))
aux1 = insFldr(foldersTree, gFldr("download", ""))
insDoc(aux1, gLnk(0, "사진관련", "http://rcnkic.dungg.com/bbs/zboard.php?id=pds_photo", ""))
insDoc(aux1, gLnk(0, "무비자료", "http://rcnkic.dungg.com/bbs/zboard.php?id=pds_movie", ""))
insDoc(aux1, gLnk(0, "컴퓨터관련", "http://rcnkic.dungg.com/bbs/zboard.php?id=pds_util", ""))
insDoc(aux1, gLnk(0, "기타자료", "http://rcnkic.dungg.com/bbs/zboard.php?id=pds_etc", ""))
aux1 = insFldr(foldersTree, gFldr("information", ""))
insDoc(aux1, gLnk(0, "여행정보", "http://rcnkic.dungg.com/bbs/zboard.php?id=vacation", ""))
insDoc(aux1, gLnk(0, "건강정보", "http://rcnkic.dungg.com/bbs/zboard.php?id=health", ""))
insDoc(aux1, gLnk(0, "사진정보", "http://rcnkic.dungg.com/bbs/zboard.php?id=photo", ""))
aux1 = insFldr(foldersTree, gFldr("shopping", ""));
insDoc(aux1, gLnk(0, "팝니다", "http://rcnkic.dungg.com/bbs/zboard.php?id=market1", ""))
insDoc(aux1, gLnk(0, "삽니다", "http://rcnkic.dungg.com/bbs/zboard.php?id=market2", ""))
insDoc(aux1, gLnk(0, "물물교환", "http://rcnkic.dungg.com/bbs/zboard.php?id=market3", ""))
aux1 = insFldr(foldersTree, gFldr("guest", "http://rcnkic.dungg.com/bbs/zboard.php?id=guest"));
aux1 = insFldr(foldersTree, gFldr("recommend", "http://rcnkic.dungg.com/bbs/zboard.php?id=recommend"))
initializeDocument();
</script>
=============================================================================================================================
꼭좀 해결해주세요 .. 벌써 네시간째 헤메이고 있습니다.
메뉴를 클릭하면 새창으로 떠버리네요. ㅡㅜ
현재창으로 뜨게 하려면 어떻게 해야 하는지 모르겠습니다.
도움 부탁드릴께요.
아래 소스 올립니다.
** 노프레임 홈입니다.
============================================================================================================================
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=euc-kr">
<style type="text/css">
A:link {color: #000000; text-decoration: none}
A:visited {color: #000000; text-decoration: none}
A:hover {color: #dddddd; text-decoration: none}
BODY,TR,TD,INPUT{font-size:9pt;font-family:Verdana,굴림}
</STYLE>
<script language="JavaScript" type="text/javascript">
function Folder(folderDescription, hreference) { //constructor
//constant data;
this.desc = folderDescription;
this.hreference = hreference;
this.id = -1;
this.navObj = 0;
this.iconImg = 0;
this.nodeImg = 0;
this.isLastNode = 0;
// dynamic data
this.isOpen = true;
this.iconSrc = "img/ftv2folderopen.gif";
this.children = new Array;
this.nChildren = 0;
// methods
this.initialize = initializeFolder;
this.setState = setStateFolder;
this.addChild = addChild;
this.createIndex = createEntryIndex;
this.hide = hideFolder;
this.display = display;
this.renderOb = drawFolder;
this.totalHeight = totalHeight;
this.subEntries = folderSubEntries;
this.outputLink = outputFolderLink;
}
function Folder2(folderDescription, hreference) { //constructor
//constant data;
this.desc = folderDescription;
this.hreference = hreference;
this.id = -1;
this.navObj = 0;
this.iconImg = 0;
this.nodeImg = 0;
this.isLastNode = 0;
// dynamic data
this.isOpen = true;
this.iconSrc = "img/ftv2folderopen.gif";
this.children = new Array;
this.nChildren = 0;
// methods
this.initialize = initializeFolder;
this.setState = setStateFolder;
this.addChild = addChild;
this.createIndex = createEntryIndex;
this.hide = hideFolder;
this.display = display;
this.renderOb = drawFolder;
this.totalHeight = totalHeight;
this.subEntries = folderSubEntries;
this.outputLink = outputFolderLink2;
}
function setStateFolder(isOpen) {
var subEntries;
var totalHeight;
var fIt = 0;
var i = 0;
if(isOpen == this.isOpen)
return
if(browserVersion == 2) {
totalHeight = 0
for(i = 0; i < this.nChildren; i++)
totalHeight = totalHeight + this.children[i].navObj.clip.height;
subEntries = this.subEntries();
if(this.isOpen)
totalHeight = 0 - totalHeight;
for(fIt = this.id + subEntries + 1; fIt < nEntries; fIt++)
indexOfEntries[fIt].navObj.moveBy(0, totalHeight);
}
this.isOpen = isOpen;
propagateChangesInState(this);
}
function propagateChangesInState(folder) {
var i=0
if (folder.isOpen) {
if (folder.nodeImg)
if (folder.isLastNode)
folder.nodeImg.src = "images/click_10.gif"
else
folder.nodeImg.src = "images/click_7.gif"
for (i=0; i<folder.nChildren; i++)
folder.children[i].display()
} else {
if (folder.nodeImg)
if (folder.isLastNode)
folder.nodeImg.src = "images/click_10.gif"
else
folder.nodeImg.src = "images/click_8.gif"
for (i=0; i<folder.nChildren; i++)
folder.children[i].hide()
}
}
function hideFolder() {
if(browserVersion == 1) {
if(this.navObj.style.display == "none")
return
this.navObj.style.display = "none"
}
else {
if(this.navObj.visibility == "hiden")
return
this.navObj.visibility = "hiden"
}
this.setState(0)
}
function initializeFolder(level, lastNode, leftSide) {
var i = 0;
var j = 0;
var numberOfFolders;
var numberOfDocs;
var nc;
nc = this.nChildren;
this.createIndex();
var auxEv = "";
if(browserVersion > 0)
auxEv = "<a href='javascript:clickOnNode("+this.id+")'>"
else
auxEv = "<a>"
if(level > 0) {
if(lastNode) { //the last 'brother' in the children array
this.renderOb(leftSide + auxEv + "<img name='nodeIcon" + this.id + "'src='images/aa.gif' width=16 height=22 border=0></a>");
leftSide = leftSide + "<img src='images/ftv2blank.gif' width=16 height=22>";
this.isLastNode = 1;
}
else {
this.renderOb(leftSide + auxEv + "<img name='nodeIcon" + this.id + "' src='images/ftv2mnode.gif' width=16 height=22 border=0></a>");
leftSide = leftSide + "<img src='images/click_9.gif' width=16 height=22>";
this.isLastNode = 0;
}
}
else
this.renderOb("");
if(nc > 0) {
level = level + 1;
for(i = 0; i < this.nChildren; i++) {
if(i == this.nChildren-1)
this.children[i].initialize(level, 1, leftSide);
else
this.children[i].initialize(level, 0, leftSide);
}
}
}
function drawFolder(leftSide) {
if (browserVersion == 2) {
if (!doc.yPos)
doc.yPos=8
doc.write("<layer id='folder" + this.id + "' top=" + doc.yPos + " visibility=hiden>")
}
doc.write("<table ")
if (browserVersion == 1)
doc.write(" id='folder" + this.id + "' style='position:block;' ")
doc.write(" border=0 cellspacing=0 cellpadding=0>")
doc.write("<tr><td>")
doc.write(leftSide)
this.outputLink()
doc.write("</a>")
doc.write("</td><td nowrap>")
doc.write("<DIV CLASS="fldrroot">");
if (USETEXTLINKS) {
this.outputLink()
doc.write(this.desc + "</a>")
}
else
doc.write(this.desc)
doc.write("</DIV>");
doc.write("</td>")
doc.write("</table>")
if (browserVersion == 2) {
doc.write("</layer>")
}
if (browserVersion == 1) {
this.navObj = doc.all["folder"+this.id]
this.iconImg = doc.all["folderIcon"+this.id]
this.nodeImg = doc.all["nodeIcon"+this.id]
} else if (browserVersion == 2) {
this.navObj = doc.layers["folder"+this.id]
this.iconImg = this.navObj.document.images["folderIcon"+this.id]
this.nodeImg = this.navObj.document.images["nodeIcon"+this.id]
doc.yPos=doc.yPos+this.navObj.clip.height
}
}
function outputFolderLink() {
if (this.hreference) {
doc.write("<a href='" + this.hreference + "' TARGET="detail" ")
if (browserVersion > 0)
doc.write("onClick='javascript:clickOnFolder("+this.id+")'")
doc.write(">")
}
else
doc.write("<a href='javascript:clickOnFolder("+this.id+")'>")
}
function outputFolderLink2() {
if (this.hreference) {
doc.write("<a href='" + this.hreference + "' TARGET="detail" ")
if (browserVersion > 0)
doc.write("onClick='javascript:clickOnFolder("+this.id+")'")
doc.write(">")
}
else
doc.write("<a href='javascript:clickOnFolder("+this.id+")'>")
}
function addChild(childNode) {
this.children[this.nChildren] = childNode
this.nChildren++
return childNode
}
function folderSubEntries() {
var i = 0
var se = this.nChildre
for (i=0; i < this.nChildren; i++){
if (this.children[i].children) //is a folder
se = se + this.children[i].subEntries()
}
return se
}
function Item(itemDescription, itemLink, itemImg) { // Constructor
// constant data
this.desc = itemDescription
this.link = itemLink
this.id = -1 //initialized in initalize()
this.navObj = 0 //initialized in render()
this.iconImg = 0 //initialized in render()
// iconSrc에 지정되는 이미지 파일을 각 아이템에 맞게 지정할 수 있도록 한다 (목표)
this.iconSrc = itemImg;
// methods
this.initialize = initializeItem
this.createIndex = createEntryIndex
this.hide = hideItem
this.display = display
this.renderOb = drawItem
this.totalHeight = totalHeight
}
function hideItem() {
if (browserVersion == 1) {
if (this.navObj.style.display == "none")
return
this.navObj.style.display = "none"
} else {
if (this.navObj.visibility == "hiden")
return
this.navObj.visibility = "hiden"
}
}
function initializeItem(level, lastNode, leftSide) {
this.createIndex()
if (level>0)
if (lastNode) { //the last 'brother' in the children array
this.renderOb(leftSide + "<img src='images/click_1.gif' width=16 height=22>")
leftSide = leftSide + "<img src='images/click_2.gif' width=16 height=22>"
} else {
this.renderOb(leftSide + "<img src='images/click_3.gif' width=16 height=22>")
leftSide = leftSide + "<img src='images/click_4.gif' width=16 height=22>"
}
else
this.renderOb("")
}
function drawItem(leftSide) {
if (browserVersion == 2)
doc.write("<layer id='item" + this.id + "' top=" + doc.yPos + " visibility=hiden>")
doc.write("<table ")
if (browserVersion == 1)
doc.write(" id='item" + this.id + "' style='position:block;' ")
doc.write(" border=0 cellspacing=0 cellpadding=0>")
doc.write("<tr><td>")
doc.write(leftSide)
if(this.link != "")
doc.write("<a href=" + this.link + ">")
if(this.link != "")
doc.write("</a>")
doc.write("</td><td nowrap>")
doc.write("<DIV CLASS="fldritem">");
if (USETEXTLINKS) {
if(this.link != "")
doc.write("<a href=" + this.link + "onMouseOver=javascript:window.status='';return true;" + ">" + this.desc + "</a>")
else
doc.write(this.desc)
} else {
doc.write(this.desc)
}
doc.write("</DIV>");
doc.write("</table>")
if (browserVersion == 2)
doc.write("</layer>")
if (browserVersion == 1) {
this.navObj = doc.all["item"+this.id]
this.iconImg = doc.all["itemIcon"+this.id]
} else if (browserVersion == 2) {
this.navObj = doc.layers["item"+this.id]
this.iconImg = this.navObj.document.images["itemIcon"+this.id]
doc.yPos=doc.yPos+this.navObj.clip.height
}
}
function display() {
if (browserVersion == 1)
this.navObj.style.display = "block"
else
this.navObj.visibility = "show"
}
function createEntryIndex() {
this.id = nEntries
indexOfEntries[nEntries] = this
nEntries++
}
// total height of subEntries open
function totalHeight() { //used with browserVersion == 2
var h = this.navObj.clip.height
var i = 0
if (this.isOpen) //is a folder and _is_ open
for (i=0 ; i < this.nChildren; i++)
h = h + this.children[i].totalHeight()
return h
}
// Events
// *********************************************************
function clickOnFolder(folderId) {
var clicked = indexOfEntries[folderId]
clickOnNode(folderId)
}
function clickOnNode(folderId) {
var clickedFolder = 0
var state = 0
clickedFolder = indexOfEntries[folderId]
state = clickedFolder.isOpen
clickedFolder.setState(!state) //open<->close
window.focus(0)
}
function initializeDocument() {
if(doc.all)
browserVersion = 1; //IE4
else if(doc.layers)
browserVersion = 2; //NS4
else
browserVersion = 0; //other
foldersTree.initialize(0, 1, "");
foldersTree.display();
if(browserVersion > 0) {
doc.write("<layer top="+indexOfEntries[nEntries-1].navObj.top+"> </layer>");
// close the whole tree
clickOnNode(0)
// open the root folder
clickOnNode(0)
}
}
// Auxiliary Functions for Folder-Treee backward compatibility
// *********************************************************
function gFldr(description, hreference) {
folder = new Folder(description, hreference);
return folder;
}
function gFldr2(description, hreference) {
folder2 = new Folder2(description, hreference);
return folder2;
}
function gLnk(target, description, linkData, itemImg) {
fullLink = ""
if (target==0) {
if(linkData != "")
fullLink = "'"+linkData+"' target="detail""
else
fullLink = "";
} else {
if (target==1) {
if(linkData != "")
fullLink = "'"+linkData+"' target="_top""
else
fullLink = "";
} else if(target==3){
if(linkData != "")
fullLink = "'"+linkData+"' target="_new""
else
fullLink = "";
} else { // target == 2
if(linkData != "")
fullLink = "'http://"+linkData+"' target="detail""
else
fullLink = "";
}
}
linkItem = new Item(description, fullLink, itemImg)
return linkItem
}
function insFldr(parentFolder, childFolder) {
return parentFolder.addChild(childFolder)
}
function insDoc(parentFolder, document) {
parentFolder.addChild(document)
}
// Global variables
// ****************
USETEXTLINKS = 1;
indexOfEntries = new Array;
nEntries = 0;
doc = document;
browserVersion = 0;
selectedFolder=0;</script>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<TABLE WIDTH="1024" cellpadding="0" cellspacing="0">
<TR>
<TD width="1024" colspan="4">
<IMG SRC="images/index_1.gif" WIDTH=1024 HEIGHT=177 ALT=""></TD>
</TR>
<TR>
<TD width="211" height="51" bordercolor="#999999" bordercolorlight="#999999" align="center" valign="middle" colspan="3">
<p>
</p>
</TD>
<td width="813" height="51" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/index_8.gif">
<p><? print_outlogin("dc_outlogin", 1, 10) ?></p></td>
</TR>
<TR>
<td width="15" height="14" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_1.gif"> </td>
<td width="180" height="14" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_2.gif"> </td>
<td width="16" height="14" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_3.gif"> </td>
<td width="813" height="14" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999"> </td>
</TR>
<TR>
<td width="15" height="301" align="center" valign="middle" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_4.gif"> </td>
<td width="180" height="301" align="left" valign="top" bordercolor="#999999" bordercolorlight="#999999" background="images/menu_5.gif"> <p>
<script language="JavaScript">
foldersTree = gFldr("<B>main menu</B>", "")
aux1 = insFldr(foldersTree, gFldr("<B>Home</B>", "http://www.worldkic.com", ""));
aux1 = insFldr(foldersTree, gFldr("introduce", ""));
insDoc(aux1, gLnk(0, "profile", "http://rcnkic.dungg.com/bbs/zboard.php?id=profile", ""))
insDoc(aux1, gLnk(0, "diary", "http://rcnkic.dungg.com/bbs/zboard.php?id=diary", ""))
insDoc(aux1, gLnk(0, "admin", "http://rcnkic.dungg.com/bbs/zboard.php?id=admin", ""))
aux1 = insFldr(foldersTree, gFldr("board", ""))
insDoc(aux1, gLnk(0, "notice", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_notice", ""))
insDoc(aux1, gLnk(0, "freeboard", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_free", ""))
insDoc(aux1, gLnk(0, "gag", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_gag", ""))
insDoc(aux1, gLnk(0, "essay", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_esay", ""))
insDoc(aux1, gLnk(0, "game", "http://rcnkic.dungg.com/bbs/zboard.php?id=board_game", ""))
aux1 = insFldr(foldersTree, gFldr("gallery", ""))
insDoc(aux1, gLnk(0, "인물", "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_man", ""))
insDoc(aux1, gLnk(0, "풍경", "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_poong", ""))
insDoc(aux1, gLnk(0, "접사" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_zoom", ""))
insDoc(aux1, gLnk(0, "모델" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_model", ""))
insDoc(aux1, gLnk(0, "행사" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_event", ""))
insDoc(aux1, gLnk(0, "누드" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_nude", ""))
insDoc(aux1, gLnk(0, "회원투고" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_member", ""))
insDoc(aux1, gLnk(0, "엽기" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_yub", ""))
insDoc(aux1, gLnk(0, "기타" , "http://rcnkic.dungg.com/bbs/zboard.php?id=gallery_etc", ""))
aux1 = insFldr(foldersTree, gFldr("download", ""))
insDoc(aux1, gLnk(0, "사진관련", "http://rcnkic.dungg.com/bbs/zboard.php?id=pds_photo", ""))
insDoc(aux1, gLnk(0, "무비자료", "http://rcnkic.dungg.com/bbs/zboard.php?id=pds_movie", ""))
insDoc(aux1, gLnk(0, "컴퓨터관련", "http://rcnkic.dungg.com/bbs/zboard.php?id=pds_util", ""))
insDoc(aux1, gLnk(0, "기타자료", "http://rcnkic.dungg.com/bbs/zboard.php?id=pds_etc", ""))
aux1 = insFldr(foldersTree, gFldr("information", ""))
insDoc(aux1, gLnk(0, "여행정보", "http://rcnkic.dungg.com/bbs/zboard.php?id=vacation", ""))
insDoc(aux1, gLnk(0, "건강정보", "http://rcnkic.dungg.com/bbs/zboard.php?id=health", ""))
insDoc(aux1, gLnk(0, "사진정보", "http://rcnkic.dungg.com/bbs/zboard.php?id=photo", ""))
aux1 = insFldr(foldersTree, gFldr("shopping", ""));
insDoc(aux1, gLnk(0, "팝니다", "http://rcnkic.dungg.com/bbs/zboard.php?id=market1", ""))
insDoc(aux1, gLnk(0, "삽니다", "http://rcnkic.dungg.com/bbs/zboard.php?id=market2", ""))
insDoc(aux1, gLnk(0, "물물교환", "http://rcnkic.dungg.com/bbs/zboard.php?id=market3", ""))
aux1 = insFldr(foldersTree, gFldr("guest", "http://rcnkic.dungg.com/bbs/zboard.php?id=guest"));
aux1 = insFldr(foldersTree, gFldr("recommend", "http://rcnkic.dungg.com/bbs/zboard.php?id=recommend"))
initializeDocument();
</script>
=============================================================================================================================
꼭좀 해결해주세요 .. 벌써 네시간째 헤메이고 있습니다.
정확히 21시간만에 해결했습니다.
소스 본문중
TARGET=\"detail\" "
위 내용과 같은 타겟 설정해 주는부분을 찾습니다.
그래서 아래와 같이 모두 바꾸어줍니다.
TARGET=\"\" ")
결론은 타겟으로 프레임을 설정하는 프레임 내용만 삭제시켜주면
해당 페이지(원프레임)에 링크가 걸리는 페이지를 출력하게 됩니다.
아주 단순한건데도 불구하고 오랜시간을 허비했네요... ㅜㅜ
<a> 링크였다면 쉽게 고쳤을텐데.. 첨보는 스크립트라(왕초보) 한참 헤메였답니다..