자바스크립트 오류 문의합니다.. > 그누4 질문답변

그누4 질문답변

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

자바스크립트 오류 문의합니다.. 정보

자바스크립트 오류 문의합니다..

본문

홈페이지 작동은 정상적으로 되고 있는데..

우측 스크롤만 클릭하면 자바스크립트 오류가  떠서

스크롤이 클릭이 안되요 ㅠㅠ


처음에는 게시판 스킨문제인가 생각했는데

모든 페이지에서 동일한 현상이 나타나고 있습니다. ㅠㅠ



======================================================

메시지: 'hotDog.id'은(는) null 이거나 개체가 아닙니다.
줄: 95
문자: 1
코드: 0
URI: http://pie87.com/home/v01/java.js

=======================================================

95번째 줄에는..

while(hotDog.id!="divpop"&&hotDog.tagName!=topDog){

이렇게 적혀있는데

다른 사람들 소스랑 비교해서 봐도 95번째줄에 도대체 뭐가 문제인건지 모르겠어요..

도와주세요 흑흑 ㅠㅠ


아래는 java.js  복사해서 붙입니다 ㅠㅠㅠ



********************************************************

/* 링크 점선 없애긔 */
function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;

/* 탭 컨테이너 */
function initTabMenu(tabContainerID) {
var tabContainer = document.getElementById(tabContainerID);
var tabAnchor = tabContainer.getElementsByTagName("a");
var i = 0;

for(i=0; i<tabAnchor.length; i++) {
if (tabAnchor.item(i).className == "tab")
thismenu = tabAnchor.item(i);
else
continue;

thismenu.container = tabContainer;
thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
thismenu.targetEl.style.display = "none";
thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
thismenu.onclick = function tabMenuClick() {
currentmenu = this.container.current;
if (currentmenu == this)
return false;

if (currentmenu) {
currentmenu.targetEl.style.display = "none";
if (currentmenu.imgEl) {
currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
} else {
currentmenu.className = currentmenu.className.replace(" on", "");
}
}
this.targetEl.style.display = "";
if (this.imgEl) {
this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
} else {
this.className += " on";
}
this.container.current = this;

return false;
};

if (!thismenu.container.first)
thismenu.container.first = thismenu;
}
if (tabContainer.first)
tabContainer.first.onclick();
}






/* 스크립트 팝업 */
        function getCookie(name) {
                var Found = false;
                var start, end;
                var i = 0;

                while(i <= document.cookie.length) {
                        start = i;
                        end = start + name.length;

                        if(document.cookie.substring(start, end) == name) {
                                Found = true;
                                break;
                        }
                        i++;
                }

                if(Found == true) {
                        start = end + 1;
                        end = document.cookie.indexOf(";", start);
                        if(end < start)
                                end = document.cookie.length;
                        return document.cookie.substring(start, end);
                }
        }


isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
topDog=isIE ? "BODY" : "HTML";
whichDog=isIE ? document.all.divpop : document.getElementById("divpop");
hotDog=isIE ? event.srcElement : e.target;
while(hotDog.id!="divpop"&&hotDog.tagName!=topDog){                  <====== 95번째줄
hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
}
if (hotDog.id=="divpop"){
offsetx=isIE ? event.clientX : e.clientX;
offsety=isIE ? event.clientY : e.clientY;
nowX=parseInt(whichDog.style.left);
nowY=parseInt(whichDog.style.top);
ddEnabled=true;
document.onmousemove=dd;
}
}

function dd(e){
if (!ddEnabled) return;
whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
return false;
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");



        //메인팝업관련 쿠키설정
        function setCookie( name, value, expiredays )
        {
                var now = new Date();
                now.setDate( now.getDate() + expiredays );
                document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + now.toGMTString() + ";"
        }

        //메인팝업감추기
        function closeDiv()
        {
                var divpop = document.getElementById( "divpop");
                var checkbox = document.getElementById( "checkbox");

                if( checkbox.checked==true) {
                setCookie( "viewPop", "ok" , 1 );
                }
                divpop.style.visibility = "hidden";
        }

댓글 전체

일단 오류 숨김소스로 스크롤 문제는 해결했습니다 ㅠㅠ

출처 : http://traveler.pe.kr/110092212202

*****************************************************

<script language="JavaScript">
window.onerror = ErrorSetting

var e_msg="";
var e_file="";
var e_line="";


function ErrorSetting(msg, file_loc, line_no) {
    e_msg=msg;
    e_file=file_loc;
    e_line=line_no;
    return true;
}
</script>
전체 66,558 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT