동글이

자바스크립트를 사용한 파일을 삽입하면 숫자가 생겨요.

2007-12-10 17;42;42.jpg
그림에서 보듯이 메뉴 하단에 보면 숫자 "1"이 생깁니다.

아래 내용의 파일을 독자적으로 사용을 하면 숫자가 생기지 않는데, 내가 필요로 하는 부분에 파일을 첨부해서 보면 그림처럼 숫자가 생깁니다.

숫자가 보이지 않게 할 수 있는 방법이 없을까요?

~~~~ 소스자료입니다.


<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

<style>
.sdmenu {
width: 150px;
font-family: Sans-Serif;
font-size: 12px;
padding-bottom: 10px;
background: #eee url('http://www.esamsungedu.kr/sone/sone_img/bottom.gif') no-repeat right bottom;
color: #FFF
}

.sdmenu .title, .sdmenu .titlehidden{
display: block;
font-weight: bold;
color: white;
background: #FFF url('http://www.esamsungedu.kr/sone/sone_img/title.gif') repeat-x;; padding-left:0; padding-right:0; padding-top:5px; padding-bottom:5px
}

.sdmenu .title {
border-bottom: 1px solid #DDD;
}

.sdmenu .arrow {
margin-left: 10px;
margin-right: 7px;
}

.sdmenu .titlehidden {
border-bottom: none;
}

.sdmenu #top {
background: url('http://www.esamsungedu.kr/sone/sone_img/toptitle.gif') no-repeat;
}

.sdmenu .submenu {
overflow: hidden;
}

.sdmenu .submenu a {
padding: 5px 0;
text-indent: 10px;
background: #EEE;
display: block;
border-bottom: 1px solid #DDD;
color: #066;
text-decoration: none;
}

.sdmenu .submenu a:hover {
background : #066 url('http://www.esamsungedu.kr/sone/sone_img/linkarrow.gif') no-repeat right center;
color: #FFF
}

.menu001 { font-family:Helvetica,Arial,Verdana,sans-serif,gulim; font-weight:bold; font-size: 9pt; color: #474545;}
.menu001 a:link{text-decoration:none; color:"#A19EA1"; font-size:9pt}
.menu001 a:visited{text-decoration:none; color:"#A19EA1"; font-size:9pt}
.menu001 a:active{text-decoration:none; color:"#A19EA1"; font-size:9pt}
.menu001 a:hover{text-decoration:underline; color:"#A19EA1"; font-size:9pt}

</style>

<script type="text/javascript">

var remember = true; //Remember menu states, and restore them on next visit.
var contractall_default= false; //Should all submenus be contracted by default? (true or false)

var menu, titles, submenus, arrows, bypixels;
var heights = new Array();

var n = navigator.userAgent;
if(/Opera/.test(n)) bypixels = 2;
else if(/Firefox/.test(n)) bypixels = 3;
else if(/MSIE/.test(n)) bypixels = 2;

/////DD added expandall() and contractall() functions/////

function slash_expandall(){
if (typeof menu!="undefined"){
for(i=0; i<Math.max(titles.length, submenus.length); i++){
titles[i].className="title";
arrows[i].src = "http://www.esamsungedu.kr/sone/sone_img/expanded.gif";
submenus[i].style.display="";
submenus[i].style.height = heights[i]+"px";
}
}
}

function slash_contractall(){
if (typeof menu!="undefined"){
for(i=0; i<Math.max(titles.length, submenus.length); i++){
titles[i].className="titlehidden";
arrows[i].src = "http://www.esamsungedu.kr/sone/sone_img/collapsed.gif";
submenus[i].style.display="none";
submenus[i].style.height = 0;
}
}
}


/////End DD added functions///////////////////////////////


function init(){
menu = getElementsByClassName("sdmenu", "div", document)[0];
titles = getElementsByClassName("title", "span", menu);
submenus = getElementsByClassName("submenu", "div", menu);
arrows = getElementsByClassName("arrow", "img", menu);
for(i=0; i<Math.max(titles.length, submenus.length); i++) {
titles[i].onclick = gomenu;
arrows[i].onclick = gomenu;
heights[i] = submenus[i].offsetHeight;
submenus[i].style.height = submenus[i].offsetHeight+"px";
}
if(remember)
restore()
else if (contractall_default) //DD added code
slash_contractall() //DD added code
}

function restore() {
if(getcookie("menu") != null) {
var hidden = getcookie("menu").split(",");
for(var i in hidden) {
titles[hidden[i]].className = "titlehidden";
submenus[hidden[i]].style.height = "0px";
submenus[hidden[i]].style.display = "none";
arrows[hidden[i]].src = "http://www.esamsungedu.kr/sone/sone_img/collapsed.gif";
}
}
}

function gomenu(e) {
if (!e)
var e = window.event;
var ce = (e.target) ? e.target : e.srcElement;
var sm;
for(var i in titles) {
if(titles[i] == ce || arrows[i] == ce)
sm = i;
}
if(parseInt(submenus[sm].style.height) > parseInt(heights[sm])-2) {
hidemenu(sm);
} else if(parseInt(submenus[sm].style.height) < 2) {
titles[sm].className = "title";
showmenu(sm);
}
}

function hidemenu(sm) {
var nr = submenus[sm].getElementsByTagName("a").length*bypixels;
submenus[sm].style.height = (parseInt(submenus[sm].style.height)-nr)+"px";
var to = setTimeout("hidemenu("+sm+")", 30);
if(parseInt(submenus[sm].style.height) <= nr) {
clearTimeout(to);
submenus[sm].style.display = "none";
submenus[sm].style.height = "0px";
arrows[sm].src = "http://www.esamsungedu.kr/sone/sone_img/collapsed.gif";
titles[sm].className = "titlehidden";
}
}

function showmenu(sm) {
var nr = submenus[sm].getElementsByTagName("a").length*bypixels;
submenus[sm].style.display = "";
submenus[sm].style.height = (parseInt(submenus[sm].style.height)+nr)+"px";
var to = setTimeout("showmenu("+sm+")", 30);
if(parseInt(submenus[sm].style.height) > (parseInt(heights[sm])-nr)) {
clearTimeout(to);
submenus[sm].style.height = heights[sm]+"px";
arrows[sm].src = "http://www.esamsungedu.kr/sone/sone_img/expanded.gif";
}


}

function store() {
var hidden = new Array();
for(var i in titles) {
if(titles[i].className == "titlehidden")
hidden.push(i);
}
putcookie("menu", hidden.join(","), 30);
}

function getElementsByClassName(strClassName, strTagName, oElm){
var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
var arrReturnElements = new Array();
strClassName = strClassName.replace(/\-/g, "\\-");
var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
var oElement;
for(var i=0; i<arrElements.length; i++){
oElement = arrElements[i];
if(oRegExp.test(oElement.className)){
arrReturnElements.push(oElement);
}
}
return (arrReturnElements)
}

function putcookie(c_name,value,expiredays) {
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie = c_name + "=" + escape(value) + ((expiredays==null) ? "" : ";expires="+exdate);
}

function getcookie(c_name) {
if(document.cookie.length > 0) {
var c_start = document.cookie.indexOf(c_name + "=");
if(c_start != -1) {
c_start = c_start + c_name.length + 1;
var c_end = document.cookie.indexOf(";",c_start);
if(c_end == -1)
c_end = document.cookie.length;
return unescape(document.cookie.substring(c_start, c_end));
}
}
return null;
}

window.onload = init;
if(remember) window.onunload = store;

</script>


<center>
<span class="menu001">메뉴 </span><a href="javascript:slash_expandall()"><span class="menu001">전체확장</span></a> / <a href="javascript:slash_contractall()"><span class="menu001">전체축소</span></a>
</center>
<table><tr><td>
<div class="sdmenu">
<span class="title" id="top" style="cursor:pointer">
<img src="http://www.esamsungedu.kr/sone/sone_img/expanded.gif" class="arrow">정석</span>
<div class="submenu">
<a href="#">- 기본정석 10가</a>
<a href="#">- 기본정석 10나</a>
<a href="#">- 기본정석 수1</a>
<a href="#">- 기본정석 수2</a>
</div>
<span class="title" style="cursor:pointer">
<img src="http://www.esamsungedu.kr/sone/sone_img/expanded.gif" class="arrow">모의고사</span>
<div class="submenu">
<a href="#">- 단원별 10가</a>
<a href="#">- 단원별 10나</a>
<a href="#">- 단원별 수1</a>
<a href="#">- 단원별 수2</a>
<a href="#">- 실전 모의고사</a>
</div>
</div>
</td></tr></table>

첨부파일

댓글 3개

이 원인은 아닌것 같기도 하지만 아래 작업을 수행해 보시기 바랍니다.
style 에서 ' 나 " 는 사용하지 않습니다.

url('http://www.esamsungedu.kr/sone/sone_img/title.gif')

' 제거

color:"#A19EA1"

" 제거
곱슬최씨님 고맙습니다.
님이 말씀해주신대로 했지만, 숫자가 없어지질 않네요.
자바스크립트만 사용하면 숫자가 생깁니다. ㅠ.ㅠ
위 소스를 head.hph에 직접 삽입을 하니까 숫자가 생기지 않습니다.
혹시 링크거는 방법이 잘못되었나요? 현재 전 아래와 같이 사용하고 있습니다.

<?=include_once("$g4[path]/sone_php/menu_left.php");?>
댓글을 작성하시려면 로그인이 필요합니다.

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
07-12-10 조회 1,047
07-12-10 조회 1,216
07-12-10 조회 1,654
07-12-10 조회 1,704
07-12-10 조회 1,499
07-12-10 조회 1,600
07-12-10 조회 1,242
07-12-10 조회 1,030
07-12-10 조회 1,035
07-12-10 조회 1,020
07-12-10 조회 1,049
07-12-10 조회 960
07-12-10 조회 1,791
07-12-10 조회 1,471
07-12-10 조회 1,168
07-12-10 조회 1,504
07-12-10 조회 1,041
07-12-10 조회 1,030
07-12-10 조회 1,922
07-12-10 조회 1,212