묻고답하기

윈도우 형식 메뉴입니다.
+ -  폴더가 출력됩니다.  근데 처음에는 폴더만 출력되구요. 폴더아래 서브메뉴는 처음에 표기되지않습니다.
폴더클릭시 +가 -로 변하면서 아래로 서브메뉴가 윈도우 형식으로 출력됩니다.
여기서 제가 하고뿐질문은 노프레임시 새로고침을 해버리면 다시 폴더만 나와서 게시판은 그대로 있는데 메뉴만 제자리로 돌아가 사용자가 불편하것 같아 새로고침을 해도 사용자가 클릭해서 열었던 서브메뉴를 고정시키고 싶습니다.
고수님들 수고스럽더라도 다시 한번 공부한다치고 알려주십시오.
밝은 인터넷문화를 위해서~
아래는 소스입니다.


------------------menu1.js----------------------------------------------------------------------------------------

document.onmouseover = mOver ;
document.onmouseout = mOut ;

function mOver() {
        var eSrc = window.event.srcElement ;
        if (eSrc.className == "item") {
                window.event.srcElement.className = "highlight";
        }
}

function mOut() {
        var eSrc = window.event.srcElement ;
        if (eSrc.className == "highlight") {
                window.event.srcElement.className = "item";
        }
}


var bV=parseInt(navigator.appVersion);
NS4=(document.layers) ? true : false;
IE4=((document.all)&&(bV>=4))?true:false;
ver4 = (NS4 || IE4) ? true : false;

isExpanded = false;

function getIndex($1) {
        ind = null;
        for (i=0; i<document.layers.length; i++) {
                whichEl = document.layers[i];
                if (whichEl.id == $1) {
                        ind = i;
                        break;
                }
        }
        return ind;
}

function arrange() {
        nextY = document.layers[firstInd].pageY + document.layers[firstInd].document.height;
        for (i=firstInd+1; i<document.layers.length; i++) {
                whichEl = document.layers[i];
                if (whichEl.visibility != "hide") {
                        whichEl.pageY = nextY;
                        nextY += whichEl.document.height;
                }
        }
}

function FolderInit(){
        if (NS4) {
        firstEl = "mParent";
        firstInd = getIndex(firstEl);
        showAll();
                for (i=0; i<document.layers.length; i++) {
                        whichEl = document.layers[i];
                        if (whichEl.id.indexOf("Child") != -1) whichEl.visibility = "hide";
                }
                arrange();
        }
        else {
                tempColl = document.all.tags("DIV");
                for (i=0; i<tempColl.length; i++) {
                        if (tempColl(i).className == "child") tempColl(i).style.display = "none";
                }
        }
}

function FolderExpand($1,$2) {
        if (!ver4) return;
        if (IE4) { ExpandIE($1,$2) }
        else { ExpandNS($1,$2) }
}

function ExpandIE($1,$2) {
        Expanda = eval($1 + "a");
        Expanda.blur()
        ExpandChild = eval($1 + "Child");
        if ($2 != "top") {
                ExpandTree = eval($1 + "Tree");
                ExpandFolder = eval($1 + "Folder");
        }
        if (ExpandChild.style.display == "none") {
                ExpandChild.style.display = "block";
                if ($2 != "top") {
                        if ($2 == "last") { ExpandTree.src = "./menu1/images/Lminus.gif"; }
                        else { ExpandTree.src = "./menu1/images/Tminus.gif"; }
                        ExpandFolder.src = "./menu1/images/openfoldericon.gif";        
                }
                else { mTree.src = "./menu1/images/topopen.gif"; }
        }
        else {
                ExpandChild.style.display = "none";
                if ($2 != "top") {
                        if ($2 == "last") { ExpandTree.src = "./menu1/images/Lplus.gif"; }
                        else { ExpandTree.src = "./menu1/images/Tplus.gif"; }
                        ExpandFolder.src = "./menu1/images/foldericon.gif";
                }
                else { mTree.src = "./menu1/images/top.gif"; }
        }
}
function ExpandNS($1,$2) {
        ExpandChild = eval("document." + $1 + "Child")
        if ($2 != "top") {
                ExpandTree = eval("document." + $1 + "Parent.document." + $1 + "Tree")
                ExpandFolder = eval("document." + $1 + "Parent.document." + $1 + "Folder")
        }        
        if (ExpandChild.visibility == "hide") {
                ExpandChild.visibility = "show";
                if ($2 != "top") {
                               if ($2 == "last") { ExpandTree.src = "./menu1/images/Lminus.gif"; }
                        else { ExpandTree.src = "./menu1/images/Tminus.gif"; }
                        ExpandFolder.src = "./menu1/images/openfoldericon.gif";        
                }
                else { mTree.src = "./menu1/images/topopen.gif"; }
        }
        else {
                ExpandChild.visibility = "hide";
                if ($2 != "top") {
                               if ($2 == "last") { ExpandTree.src = "./menu1/images/Lplus.gif"; }
                        else { ExpandTree.src = "./menu1/images/Tplus.gif"; }
                        ExpandFolder.src = "./menu1/images/foldericon.gif";        
                }
                else { mTree.src = "./menu1/images/top.gif"; }
        }
        arrange();
}

function showAll() {
        for (i=firstInd; i<document.layers.length; i++) {
                whichEl = document.layers[i];
                whichEl.visibility = "show";
        }
}


with (document) {
        write("<STYLE TYPE='text/css'>");
        if (NS4) {
                write(".parent { color: black; font-size:9pt; line-height:0pt; color:black; text-decoration:none; margin-top: 0px; margin-bottom: 0px; position:absolute; visibility:hidden }");
                write(".child { text-decoration:none; font-size:9pt; line-height:15pt; position:absolute }");
                write(".item { color: black; text-decoration:none }");
                write(".highlight { color: blue; text-decoration:none }");
        }
        else {
                write(".parent { font: 12px/13px; Times; text-decoration: none; color: black }");
                write(".child { font:12px/13px Times; display:none }");
                write(".item { color: black; text-decoration:none; cursor: hand }");
                write(".highlight { color: blue; text-decoration:none }");
                write(".icon { margin-right: 5 }")
        }
        write("</STYLE>");
}

onload = FolderInit;


-------------------------------------------------------------------------------------------------------------------------



-------------------------------------------------index.php---------------------------------------------------------------
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<title>메뉴수정</title>
<script language="javascript" src="./menu1/menu1.js"></script>
</head>
<body>
<div ID="mParent" class="parent">
생략
</div>
</body>
</html>



글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
여운산 제가 개인 서버를 가동하려고 하는데 딴것은 잘 작동하는데 MySQL만 작동 하지 않습니다. 어떻게해야하지요? [2] 2007.08.10
naBya 이미지맵 새창 띄우기 질문이여.. [1] 2007.08.10
Wow-Ect vsftp 쓰는데요..무슨 설정을 잘못건든건지, ftp가 되질 않네요 ㅠㅠ [1] 2007.08.10
인클루드 제로보드 말고 쓸만한 게시판? [1] 2007.08.10
The -A- 홈페이지의 창크기는 어떻게 고정해서 나타낼 수 있나요? [1] 2007.08.10
Eva010 이미지 마스크 합성에 대해서 질문있습니다 [1] 2007.08.10
오진호 홈페이지 음악이 안나오는 컴퓨터도 있습니다. [2] 2007.08.10
걸러리 PHP 코딩 질문입니다. [1] 2007.08.10
김영대 php 초보 [1] 2007.08.10
이하늘 플래쉬 관련 초초초보 질문 하나 날립니다. [1] 2007.08.10
joon,lom 사이홈처럼 조그만 새창띠우는 법좀 갈켜 주세요 [1] 2007.08.10
류관선 str_replace() 이게 이해가 가질 않습니당 ㅡ,.ㅡ? [2] 2007.08.10
정명욱 이런 홈페이지는 어떻게 만들죠? [5] 2007.08.10
freud include()와 require()에 대해서 추가질문.. [1] 2007.08.10
김만수 hover, linked, visit 속성을 여러개? [1] 2007.08.10
김성현 ftp경로 안보이게 하려면... [4] 2007.08.10
다오케이 xp에서 mysql 사용중인 컴퓨터에서...봐주세요.  
박군의그녀 <p id="box"> 다시 질문이요  
왕초보 홈페이지 메인을 설계할때요...include를 사용할려고 하는데.. [1] 2007.08.10
유치뽕 플래시에서 메뉴를 다 만들었는데요~ [4] 2007.08.10
불청캑 동적으로 텍스트박스 만들기 질문이요..  
박군의그녀 <p id="box"> 질문 [1] 2007.08.10
madem 게시물 일괄수정에 대하여  
이병준 아파치에 대해서 궁금합니다 [1] 2007.08.10
스토비━ⓒ 윈도2003 서버질문 다른거-ㅁ- [2] 2007.08.10
스토비━ⓒ 윈도 2003 서버 질문드립니다. [2] 2007.08.10
redvin 인터넷이 이상해요-_ㅠ [1] 2007.08.10
김윤희 플레쉬에 대한 질문드려요.. 꼭 답변좀 해주세요..  
惡鬼。 이런 문자는 어떻게 쓰죠? [5] 2007.08.10
Wow-Ect 리눅스 서버 설치 후 제로보드 설치했는데, php 오류..;; [2] 2007.08.10