이것 틀린곳좀 찾아주세요 정보
이것 틀린곳좀 찾아주세요본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$table_width = '305'; // 테이블폭 변경 (250px이상 설정하세요)
$call_color = '#FFFFFF'; // 테두리 색상(필요시 #DCDCDC로 변경)
//아래 3개부분 테이블명 입력요 -> co1 ... 등 지우고...
$my_board41 = 'molab_2_1'; // 공지사항
$my_board42 = 'molab_2_2'; // FAQ
$my_board43 = 'molab_2_4'; // 질문답변
?>
<SCRIPT type=text/javascript>
<!--
old_debate='1';
function showLayer(objid){
document.getElementById("debate"+old_debate).style.display="none";
document.getElementById("debate"+old_debate+"#4").style.display="";
document.getElementById("debate"+objid+"#4").style.display="none";
document.getElementById("debate"+objid).style.display="";
document.getElementById("debate_content"+old_debate).style.display="none";
document.getElementById("debate_content4"+old_debate).style.display="none";
document.getElementById("debate_content"+objid).style.display="";
document.getElementById("debate_content4"+objid).style.display="";
old_debate=objid;
}
//-->
</SCRIPT>
<table width="<?=$table_width?>" border="0" cellspacing="0" cellpadding="0" align='center'>
<tr><td background="tab4_img/tab_bg.gif">
<table width="70" cellspacing="0" cellpadding="0" border="0">
<tr>
<td id=debate41><img src='tab4_img/tab_01_on.gif' width='70' height='26' border='0' align='absmiddle'></td>
<td id=debate41#4 style="DISPLAY: none;"><a href="javascript:showLayer('41')" onfocus='this.blur()'><img src='tab4_img/tab_01_off.gif' width='70' height='26' border='0' align='absmiddle'></a></td>
</tr></table></td>
<td background="tab4_img/tab_bg.gif"><table width="70" cellspacing="0" cellpadding="0" border="0">
<tr>
<td id=debate42 style="DISPLAY: none;"><img src='tab4_img/tab_02_on.gif' width='70' height='26' border='0' align='absmiddle'></td>
<td id=debate42#4><a href="javascript:showLayer('42')" onfocus='this.blur()'><img src='tab4_img/tab_02_off.gif' width='70' height='26' border='0' align='absmiddle'></a></td>
</tr></table></td>
<td background="tab4_img/tab_bg.gif"><table width="70" cellspacing="0" cellpadding="0" border="0">
<tr>
<td id=debate43 style="DISPLAY: none;"><img src='tab4_img/tab_03_on.gif' width='70' height='26' border='0' align='absmiddle'></td>
<td id=debate43#4><a href="javascript:showLayer('43')" onfocus='this.blur()'><img src='tab4_img/tab_03_off.gif' width='70' height='26' border='0' align='absmiddle'></a></td>
</tr></table></td>
<td width="<?=$table_width-210?>" background="tab4_img/tab_bg.gif" align="right" valign="bottom" style="padding-bottom:5px; padding-right:7px;">
<DIV id=debate_content41>
<a href='<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_board41?>' title='목록으로' onfocus='this.blur()'><img src="tab4_img/tab_more.gif" width='28' height='5' border='0'></a></DIV>
<DIV id=debate_content42 style="DISPLAY: none;">
<a href='<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_board42?>' title='목록으로' onfocus='this.blur()'><img src="tab4_img/tab_more.gif" width='28' height='5' border='0'></a></DIV>
<DIV id=debate_content43 style="DISPLAY: none;">
<a href='<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_board43?>' title='목록으로' onfocus='this.blur()'><img src="tab4_img/tab_more.gif" width='28' height='5' border='0'></a></DIV>
</td>
</tr>
<tr>
<td colspan='5'>
<table width="<?=$table_width?>" border="0" cellspacing="0" cellpadding="0">
<colgroup width='1'>
<colgroup>
<colgroup width='1'>
<tr>
<td bgcolor='<?=$call_color?>'></td>
<td bgcolor='#FFFFFF' valign='top' style='padding-top:5px;'>
<DIV id=debate_content41>
<?=latest('basic_pop1',$my_board41, 5, 30);?></DIV>
<DIV id=debate_content42 style="DISPLAY: none;">
<?=latest('basic_pop1',$my_board42, 5, 30);?></DIV>
<DIV id=debate_content43 style="DISPLAY: none;">
<?=latest('basic_pop1',$my_board43, 5, 30);?></DIV></td>
<td bgcolor='<?=$call_color?>'></td>
</tr>
<tr><td colspan='3' bgcolor='<?=$call_color?>'></td></tr>
</table></td></tr>
</table>
오류 주소 :
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$table_width = '305'; // 테이블폭 변경 (250px이상 설정하세요)
$call_color = '#FFFFFF'; // 테두리 색상(필요시 #DCDCDC로 변경)
//아래 3개부분 테이블명 입력요 -> co1 ... 등 지우고...
$my_board41 = 'molab_2_1'; // 공지사항
$my_board42 = 'molab_2_2'; // FAQ
$my_board43 = 'molab_2_4'; // 질문답변
?>
<SCRIPT type=text/javascript>
<!--
old_debate='1';
function showLayer(objid){
document.getElementById("debate"+old_debate).style.display="none";
document.getElementById("debate"+old_debate+"#4").style.display="";
document.getElementById("debate"+objid+"#4").style.display="none";
document.getElementById("debate"+objid).style.display="";
document.getElementById("debate_content"+old_debate).style.display="none";
document.getElementById("debate_content4"+old_debate).style.display="none";
document.getElementById("debate_content"+objid).style.display="";
document.getElementById("debate_content4"+objid).style.display="";
old_debate=objid;
}
//-->
</SCRIPT>
<table width="<?=$table_width?>" border="0" cellspacing="0" cellpadding="0" align='center'>
<tr><td background="tab4_img/tab_bg.gif">
<table width="70" cellspacing="0" cellpadding="0" border="0">
<tr>
<td id=debate41><img src='tab4_img/tab_01_on.gif' width='70' height='26' border='0' align='absmiddle'></td>
<td id=debate41#4 style="DISPLAY: none;"><a href="javascript:showLayer('41')" onfocus='this.blur()'><img src='tab4_img/tab_01_off.gif' width='70' height='26' border='0' align='absmiddle'></a></td>
</tr></table></td>
<td background="tab4_img/tab_bg.gif"><table width="70" cellspacing="0" cellpadding="0" border="0">
<tr>
<td id=debate42 style="DISPLAY: none;"><img src='tab4_img/tab_02_on.gif' width='70' height='26' border='0' align='absmiddle'></td>
<td id=debate42#4><a href="javascript:showLayer('42')" onfocus='this.blur()'><img src='tab4_img/tab_02_off.gif' width='70' height='26' border='0' align='absmiddle'></a></td>
</tr></table></td>
<td background="tab4_img/tab_bg.gif"><table width="70" cellspacing="0" cellpadding="0" border="0">
<tr>
<td id=debate43 style="DISPLAY: none;"><img src='tab4_img/tab_03_on.gif' width='70' height='26' border='0' align='absmiddle'></td>
<td id=debate43#4><a href="javascript:showLayer('43')" onfocus='this.blur()'><img src='tab4_img/tab_03_off.gif' width='70' height='26' border='0' align='absmiddle'></a></td>
</tr></table></td>
<td width="<?=$table_width-210?>" background="tab4_img/tab_bg.gif" align="right" valign="bottom" style="padding-bottom:5px; padding-right:7px;">
<DIV id=debate_content41>
<a href='<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_board41?>' title='목록으로' onfocus='this.blur()'><img src="tab4_img/tab_more.gif" width='28' height='5' border='0'></a></DIV>
<DIV id=debate_content42 style="DISPLAY: none;">
<a href='<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_board42?>' title='목록으로' onfocus='this.blur()'><img src="tab4_img/tab_more.gif" width='28' height='5' border='0'></a></DIV>
<DIV id=debate_content43 style="DISPLAY: none;">
<a href='<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_board43?>' title='목록으로' onfocus='this.blur()'><img src="tab4_img/tab_more.gif" width='28' height='5' border='0'></a></DIV>
</td>
</tr>
<tr>
<td colspan='5'>
<table width="<?=$table_width?>" border="0" cellspacing="0" cellpadding="0">
<colgroup width='1'>
<colgroup>
<colgroup width='1'>
<tr>
<td bgcolor='<?=$call_color?>'></td>
<td bgcolor='#FFFFFF' valign='top' style='padding-top:5px;'>
<DIV id=debate_content41>
<?=latest('basic_pop1',$my_board41, 5, 30);?></DIV>
<DIV id=debate_content42 style="DISPLAY: none;">
<?=latest('basic_pop1',$my_board42, 5, 30);?></DIV>
<DIV id=debate_content43 style="DISPLAY: none;">
<?=latest('basic_pop1',$my_board43, 5, 30);?></DIV></td>
<td bgcolor='<?=$call_color?>'></td>
</tr>
<tr><td colspan='3' bgcolor='<?=$call_color?>'></td></tr>
</table></td></tr>
</table>
댓글 전체

자바스크립트 함수를 제일 아래로 한번 내려보세요..
기존에 되는것을 탭최근게시물을 두개 맹글려고 수정을 하는데 이상하게 두개가 충돌이 일어나는지 안되네요
자바스크립트와 id=debate42#4 이런부분이 이해가 안되네요

혹시 <td id="debate41#4"
전체적으로 다시 수정이 필요하겠네요.
showLayer의 파라미터 인 objid값이 41,42,43이 들어가는데 예로 showLayer('42')를 보면 document.getElementById("debate_content4"+objid).style.display="";여기서 id값이 debate_content442가 됩니다. 이해하셨어요? 쉽게하려면 스크립트를 수정하면 됩니다.
스크립트를 다음으로 수정해서 테스트해 보세요.
<SCRIPT type=text/javascript>
<!--
old_debate='41';
function showLayer(objid){
document.getElementById("debate"+old_debate).style.display="none";
document.getElementById("debate"+old_debate+"#4").style.display="";
document.getElementById("debate_content"+old_debate).style.display="none";
document.getElementById("debate_content"+old_debate).style.display="none";
document.getElementById("debate"+objid+"#4").style.display="none";
document.getElementById("debate"+objid).style.display="";
document.getElementById("debate_content"+objid).style.display="";
document.getElementById("debate_content"+objid).style.display="";
old_debate=objid;
}
//-->
</SCRIPT>
showLayer의 파라미터 인 objid값이 41,42,43이 들어가는데 예로 showLayer('42')를 보면 document.getElementById("debate_content4"+objid).style.display="";여기서 id값이 debate_content442가 됩니다. 이해하셨어요? 쉽게하려면 스크립트를 수정하면 됩니다.
스크립트를 다음으로 수정해서 테스트해 보세요.
<SCRIPT type=text/javascript>
<!--
old_debate='41';
function showLayer(objid){
document.getElementById("debate"+old_debate).style.display="none";
document.getElementById("debate"+old_debate+"#4").style.display="";
document.getElementById("debate_content"+old_debate).style.display="none";
document.getElementById("debate_content"+old_debate).style.display="none";
document.getElementById("debate"+objid+"#4").style.display="none";
document.getElementById("debate"+objid).style.display="";
document.getElementById("debate_content"+objid).style.display="";
document.getElementById("debate_content"+objid).style.display="";
old_debate=objid;
}
//-->
</SCRIPT>