자바 스크립 오류 정보
자바 스크립 오류본문
목록보기 및 글읽기 권한이 있는 게시판 페이지에 접속을 하면 아래와 같은 오류가 뜹니다.
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; AskTB5.6)
Timestamp: Tue, 28 Jun 2011 18:11:24 UTC
Message: 'document.flogin.mb_id' is null or not an object
Line: 355
Char: 1
Code: 0
URI: http://홈페이지주소/bbs/login.php?wr_id=&url=board.php%3Fbo_table%3Dmain_family%26wr_id%3D
해당 355라인을 보면 다음과 같습니다.
<script type='text/javascript'>
document.flogin.mb_id.focus();
function flogin_submit(f)
{
f.action = '../bbs/login_check.php';
return true;
}
</script>
이 부분때문에 잠도 못자고 있습니다.
어떻게 오류를 잡을 수 있는 방법이 없을까요?
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; AskTB5.6)
Timestamp: Tue, 28 Jun 2011 18:11:24 UTC
Message: 'document.flogin.mb_id' is null or not an object
Line: 355
Char: 1
Code: 0
URI: http://홈페이지주소/bbs/login.php?wr_id=&url=board.php%3Fbo_table%3Dmain_family%26wr_id%3D
해당 355라인을 보면 다음과 같습니다.
<script type='text/javascript'>
document.flogin.mb_id.focus();
function flogin_submit(f)
{
f.action = '../bbs/login_check.php';
return true;
}
</script>
이 부분때문에 잠도 못자고 있습니다.
어떻게 오류를 잡을 수 있는 방법이 없을까요?
댓글 전체
document.flogin.mb_id 라는 객체가 없다는 말이니까요
document.flogin.mb_id.focus(); 이 부분을 삭제해버리세요
document.flogin.mb_id.focus(); 이 부분을 삭제해버리세요
균님. 답변 감사드립니다.
해당 소스는 어떤 파일에 있는지 알 수 있을까요?
아웃로그인 스킨을 아무리 봐도 없네요.
다른 아웃로그인 스킨을 사용하면 문제가 없는 것으로 봐서, 아웃로그인에 문제가 있는 것 같은데요.
어디에 있는지 확인할 길이 없습니다.
<script type='text/javascript'>
document.flogin.mb_id.focus();
function flogin_submit(f)
{
f.action = '../bbs/login_check.php';
return true;
}
</script>
해당 소스는 어떤 파일에 있는지 알 수 있을까요?
아웃로그인 스킨을 아무리 봐도 없네요.
다른 아웃로그인 스킨을 사용하면 문제가 없는 것으로 봐서, 아웃로그인에 문제가 있는 것 같은데요.
어디에 있는지 확인할 길이 없습니다.
<script type='text/javascript'>
document.flogin.mb_id.focus();
function flogin_submit(f)
{
f.action = '../bbs/login_check.php';
return true;
}
</script>
배추님의 아웃로그인 스킨을 사용중입니다.
<?
/**
* Bechu-Outlogin Skin for Gnuboard4
*
* Copyright (c) 2008 Choi Jae-Young <www.miwit.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *** 개인정보보호를 위한 전화번호 노출방지 *** USA
*/
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($g4['https_url']) {
$outlogin_url = $_GET['url'];
if ($outlogin_url) {
if (preg_match("/^\.\.\//", $outlogin_url)) {
$outlogin_url = urlencode($g4[url]."/".preg_replace("/^\.\.\//", "", $outlogin_url));
}
else {
$purl = parse_url($g4[url]);
if ($purl[path]) {
$path = urlencode($purl[path]);
$urlencode = preg_replace("/".$path."/", "", $urlencode);
}
$outlogin_url = $g4[url].$urlencode;
}
}
else {
$outlogin_url = $g4[url];
}
}
else {
$outlogin_url = $urlencode;
}
?>
<!-- 로그인 전 외부로그인 시작 -->
<div id="mw-outlogin">
<form name="flogin" method="post" onsubmit="flogin_submit(document.flogin);" autocomplete="off">
<input type="hidden" name="url" value="<?=$outlogin_url?>">
<div class="box-outside">
<div class="box-inside">
<input type="text" name="mb_id" id="mb_id" class="login-mb_id" value="아이디">
<input type="password" name="mb_password" id="mb_password" class="login-mb_password" value="">
<input type="image" class="login-button" src="<?=$outlogin_skin_path?>/img/outlogin_button.gif" align="absmiddle" height="25">
<div class="login-auto"><input type="checkbox" name="auto_login" id="auto_login">자동로그인</div>
<div class="login-membership">
<a href="<?=$g4[bbs_path]?>/register.php"><strong>회원가입</strong></a> <span>|</span>
<a href="javascript:win_password_lost();">아이디·비밀번호찾기</a>
</div>
</div>
</div>
</form>
</div>
<!-- 로그인 전 외부로그인 끝 -->
<script type="text/javascript">
document.getElementById("mb_id").onfocus = function() { mw_outlogin_focus_id(this); }
document.getElementById("mb_id").onblur = function() { mw_outlogin_blur_id(this); }
document.getElementById("mb_password").onfocus = function() { mw_outlogin_focus_pw(this); }
document.getElementById("mb_password").onblur = function() { mw_outlogin_blur_pw(this); }
document.getElementById("mb_password").onblur = function() { mw_outlogin_blur_pw(this); }
document.getElementById("auto_login").onclick = function() { mw_outlogin_auto(this); }
function mw_outlogin_focus_id(obj) {
if (obj.value == "아이디") {
obj.value = "";
}
//obj.style.border = "1px solid #7dacd8";
obj.style.border = "2px solid #ff4d8c";
obj.style.padding = "4px 0 0 3px";
}
function mw_outlogin_blur_id(obj) {
if (obj.value == "") {
obj.value = "아이디";
}
obj.style.border = "1px solid #CACACA";
obj.style.padding = "5px 0 0 4px";
}
function mw_outlogin_focus_pw(obj) {
if (obj.value == "") {
obj.style.background = "#fff";
}
obj.style.border = "2px solid #ff4d8c";
obj.style.padding = "4px 0 0 3px";
}
function mw_outlogin_blur_pw(obj) {
if (obj.value == "") {
obj.style.background = "url(<?=$outlogin_skin_path?>/img/pw.gif) no-repeat";
}
obj.style.border = "1px solid #CACACA";
obj.style.padding = "5px 0 0 4px";
}
function mw_outlogin_auto(obj) {
if (obj.checked) {
if (confirm("자동로그인을 사용하시면 다음부터 회원아이디와 패스워드를 입력하실 필요가 없습니다.\n\n\공공장소에서는 개인정보가 유출될 수 있으니 사용을 자제하여 주십시오.\n\n자동로그인을 사용하시겠습니까?")) {
obj.checked = true;
} else {
obj.checked = false;
}
}
}
function flogin_submit(f)
{
if (!f.mb_id.value) {
alert("회원아이디를 입력하십시오.");
f.mb_id.focus();
return;
}
if (!f.mb_password.value) {
alert("패스워드를 입력하십시오.");
f.mb_password.focus();
return;
}
<?
if ($g4[https_url])
echo "f.action = '$g4[https_url]/$g4[bbs]/login_check.php';";
else
echo "f.action = '$g4[bbs_path]/login_check.php';";
?>
f.submit();
}
</script>
<style type="text/css">
#mw-outlogin .box-outside { width:250px; height:100px; background-color:#D9D9D9; }
#mw-outlogin .box-inside { position:absolute; margin:1px 0 1px 0; width:250px; height:98px; background-color:#EFEFEF; }
#mw-outlogin .box-inside { line-height:16px; color:#7dacd8; font-size:9pt; font-family:굴림; }
#mw-outlogin .login-mb_id { position:absolute; margin:12px 0 0 10px; padding:5px 0 0 4px; border:1px solid #CACACA; width:150px; height:25px; }
#mw-outlogin .login-mb_id { font-size:9pt; color:#969696; ime-mode:disabled; }
#mw-outlogin .login-mb_password { position:absolute; margin:40px 0 0 10px; padding:3px 0 0 2px; border:1px solid #CACACA; }
#mw-outlogin .login-mb_password { width:150px; height:25px; font-size:9pt; color:#969696; background:url(<?=$outlogin_skin_path?>/img/pw.gif) no-repeat; }
#mw-outlogin .login-button { position:absolute; margin:40px 0 0 165px; }
#mw-outlogin .login-auto { position:absolute; margin:14px 0 0 161px; font-size:9pt; color:#969696; letter-spacing:-1px; }
#mw-outlogin .login-membership { position:absolute; margin:70px 0 0 10px; padding:3px 0 0 0; border-top:1px solid #DBDBDB; width:224px; }
#mw-outlogin .login-membership { text-align:center; font-size:9pt; color:#d0e1f1; }
#mw-outlogin .login-membership a { color:#7dacd8; font-size:9pt; text-decoration:none; }
#mw-outlogin .login-membership { color:#939393; }
#mw-outlogin .login-membership a { color:#939393; }
</style>
<?
/**
* Bechu-Outlogin Skin for Gnuboard4
*
* Copyright (c) 2008 Choi Jae-Young <www.miwit.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA *** 개인정보보호를 위한 전화번호 노출방지 *** USA
*/
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($g4['https_url']) {
$outlogin_url = $_GET['url'];
if ($outlogin_url) {
if (preg_match("/^\.\.\//", $outlogin_url)) {
$outlogin_url = urlencode($g4[url]."/".preg_replace("/^\.\.\//", "", $outlogin_url));
}
else {
$purl = parse_url($g4[url]);
if ($purl[path]) {
$path = urlencode($purl[path]);
$urlencode = preg_replace("/".$path."/", "", $urlencode);
}
$outlogin_url = $g4[url].$urlencode;
}
}
else {
$outlogin_url = $g4[url];
}
}
else {
$outlogin_url = $urlencode;
}
?>
<!-- 로그인 전 외부로그인 시작 -->
<div id="mw-outlogin">
<form name="flogin" method="post" onsubmit="flogin_submit(document.flogin);" autocomplete="off">
<input type="hidden" name="url" value="<?=$outlogin_url?>">
<div class="box-outside">
<div class="box-inside">
<input type="text" name="mb_id" id="mb_id" class="login-mb_id" value="아이디">
<input type="password" name="mb_password" id="mb_password" class="login-mb_password" value="">
<input type="image" class="login-button" src="<?=$outlogin_skin_path?>/img/outlogin_button.gif" align="absmiddle" height="25">
<div class="login-auto"><input type="checkbox" name="auto_login" id="auto_login">자동로그인</div>
<div class="login-membership">
<a href="<?=$g4[bbs_path]?>/register.php"><strong>회원가입</strong></a> <span>|</span>
<a href="javascript:win_password_lost();">아이디·비밀번호찾기</a>
</div>
</div>
</div>
</form>
</div>
<!-- 로그인 전 외부로그인 끝 -->
<script type="text/javascript">
document.getElementById("mb_id").onfocus = function() { mw_outlogin_focus_id(this); }
document.getElementById("mb_id").onblur = function() { mw_outlogin_blur_id(this); }
document.getElementById("mb_password").onfocus = function() { mw_outlogin_focus_pw(this); }
document.getElementById("mb_password").onblur = function() { mw_outlogin_blur_pw(this); }
document.getElementById("mb_password").onblur = function() { mw_outlogin_blur_pw(this); }
document.getElementById("auto_login").onclick = function() { mw_outlogin_auto(this); }
function mw_outlogin_focus_id(obj) {
if (obj.value == "아이디") {
obj.value = "";
}
//obj.style.border = "1px solid #7dacd8";
obj.style.border = "2px solid #ff4d8c";
obj.style.padding = "4px 0 0 3px";
}
function mw_outlogin_blur_id(obj) {
if (obj.value == "") {
obj.value = "아이디";
}
obj.style.border = "1px solid #CACACA";
obj.style.padding = "5px 0 0 4px";
}
function mw_outlogin_focus_pw(obj) {
if (obj.value == "") {
obj.style.background = "#fff";
}
obj.style.border = "2px solid #ff4d8c";
obj.style.padding = "4px 0 0 3px";
}
function mw_outlogin_blur_pw(obj) {
if (obj.value == "") {
obj.style.background = "url(<?=$outlogin_skin_path?>/img/pw.gif) no-repeat";
}
obj.style.border = "1px solid #CACACA";
obj.style.padding = "5px 0 0 4px";
}
function mw_outlogin_auto(obj) {
if (obj.checked) {
if (confirm("자동로그인을 사용하시면 다음부터 회원아이디와 패스워드를 입력하실 필요가 없습니다.\n\n\공공장소에서는 개인정보가 유출될 수 있으니 사용을 자제하여 주십시오.\n\n자동로그인을 사용하시겠습니까?")) {
obj.checked = true;
} else {
obj.checked = false;
}
}
}
function flogin_submit(f)
{
if (!f.mb_id.value) {
alert("회원아이디를 입력하십시오.");
f.mb_id.focus();
return;
}
if (!f.mb_password.value) {
alert("패스워드를 입력하십시오.");
f.mb_password.focus();
return;
}
<?
if ($g4[https_url])
echo "f.action = '$g4[https_url]/$g4[bbs]/login_check.php';";
else
echo "f.action = '$g4[bbs_path]/login_check.php';";
?>
f.submit();
}
</script>
<style type="text/css">
#mw-outlogin .box-outside { width:250px; height:100px; background-color:#D9D9D9; }
#mw-outlogin .box-inside { position:absolute; margin:1px 0 1px 0; width:250px; height:98px; background-color:#EFEFEF; }
#mw-outlogin .box-inside { line-height:16px; color:#7dacd8; font-size:9pt; font-family:굴림; }
#mw-outlogin .login-mb_id { position:absolute; margin:12px 0 0 10px; padding:5px 0 0 4px; border:1px solid #CACACA; width:150px; height:25px; }
#mw-outlogin .login-mb_id { font-size:9pt; color:#969696; ime-mode:disabled; }
#mw-outlogin .login-mb_password { position:absolute; margin:40px 0 0 10px; padding:3px 0 0 2px; border:1px solid #CACACA; }
#mw-outlogin .login-mb_password { width:150px; height:25px; font-size:9pt; color:#969696; background:url(<?=$outlogin_skin_path?>/img/pw.gif) no-repeat; }
#mw-outlogin .login-button { position:absolute; margin:40px 0 0 165px; }
#mw-outlogin .login-auto { position:absolute; margin:14px 0 0 161px; font-size:9pt; color:#969696; letter-spacing:-1px; }
#mw-outlogin .login-membership { position:absolute; margin:70px 0 0 10px; padding:3px 0 0 0; border-top:1px solid #DBDBDB; width:224px; }
#mw-outlogin .login-membership { text-align:center; font-size:9pt; color:#d0e1f1; }
#mw-outlogin .login-membership a { color:#7dacd8; font-size:9pt; text-decoration:none; }
#mw-outlogin .login-membership { color:#939393; }
#mw-outlogin .login-membership a { color:#939393; }
</style>
다른 로그인폼을 사용하면 이상 없다는 말은 로그인폼 명이 중복 되는 것 같네요
<form name="flogin" 이부분을 <form name="flogin2" 로 변경하세요
<form name="flogin" 이부분을 <form name="flogin2" 로 변경하세요
균이님. 답변 감사합니다.
말씀하신대로 폼네임을 flogin -> flogin2 로 변경을 하니 다른 자바스크립 에러가 나서 로그인이 되지 않았습니다. ㅠㅠ
방법이 없나봅니다. ㅠㅠ
말씀하신대로 폼네임을 flogin -> flogin2 로 변경을 하니 다른 자바스크립 에러가 나서 로그인이 되지 않았습니다. ㅠㅠ
방법이 없나봅니다. ㅠㅠ
방법이 없는 프로그램이 어디있겠어요
장님 코끼리 다리 만지기식으로 처방을 하려니 안되는 것이지요
장님 코끼리 다리 만지기식으로 처방을 하려니 안되는 것이지요
답변 감사드립니다.