이것 틀린곳좀 찾아주세요 > 그누4 질문답변

그누4 질문답변

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

이것 틀린곳좀 찾아주세요 정보

이것 틀린곳좀 찾아주세요

본문

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 :

<?
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>
  • 복사

댓글 전체

전체적으로 다시 수정이 필요하겠네요.
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>
© SIRSOFT
현재 페이지 제일 처음으로