탭 최신게시물 관련 질문입니다.

안녕하세요.
탭 최신게시물 스킨을 적용하였는데.
처음 최신게시물 보면 1번째 게시판으로 지정한건 리스트에 출력되어 있는데
상단에 타이틀 버턴은 불이 안들어 오고 불이 꺼진 상태가 되네요.
마우스를 올리면 그세야 롤오버 된 버턴이 보이고요..

소스는 아래 첨부 해 봅니다 고수님들 꼭좀 ... 답변 부탁 드리겠습니다.

감사합니다.

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

include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$tab_img = "{$g4[path]}/tab_img"; //이미지 경로
$tab_width = "276"; //탭메뉴 폭

$tab_gr = "커뮤니티"; //그룹명 또는 아무끼나 맴대루

$tab_bo1 = "project_2"; //처음 출력될 게시판 ID
$tab_bo2 = "notice"; //공지 게시판 ID

?><head>
<script language="javascript">
function tab_img_change(t){
for(var i = 1; i <= 2; i++) {
img = document.getElementById('tab_bar'+i);
img.src = "<?=$tab_img?>/tab"+i+"_off.gif";
eval("document.getElementById('tab_view"+i+"')").style.display="none";

if ( t == i ) {
img.src = "<?=$tab_img?>/tab"+i+"_on.gif";
eval("document.getElementById('tab_view"+i+"')").style.display="";
}
}
}
</script>
</head>
<style>
.la { font-family:굴림; font-size:9pt; color:#636363;}
</style>
<table width='<?=$tab_width?>' cellpadding=0 cellspacing=0 border=0>
<tr>

<td width=74>
<a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$tab_bo1?>">
<img id="tab_bar1" style="cursor:pointer;" onMouseOver="tab_img_change(1)" src="<?=$tab_img?>/tab1_off.gif" width="74" height="26" border="0"></a></td>
<td width=150>
<a href="<?=$g4['bbs_path']?>/board.php?bo_table=<?=$tab_bo2?>">
<img id="tab_bar2" style="cursor:pointer;" onMouseOver="tab_img_change(2)" src="<?=$tab_img?>/tab2_off.gif" width="74" height="26" border="0"></a></td>
<td width='46' style='padding-top:3px;' class='la'>aa</td>
</tr>
<tr>
<td colspan='5'>
<div id="tab_view1">
<?=latest('basic',$tab_bo1, 5, 25, 100); //제목길이는 최신글 스킨에서 수정요 ?>
</div>
<div id="tab_view2" style="display: none">
<?=latest('basic',$tab_bo2, 5, 25, 100);?>
</div>
</td>
</tr>
</table>
[/code]
|

댓글 2개

<script language="javascript">
function tab_img_change(t){
for(var i = 1; i <= 2; i++) {
img = document.getElementById('tab_bar'+i);
img.src = "<?=$tab_img?>/tab"+i+"_off.gif";
eval("document.getElementById('tab_view"+i+"')").style.display="none";

if ( t == i ) {
img.src = "<?=$tab_img?>/tab"+i+"_on.gif";
eval("document.getElementById('tab_view"+i+"')").style.display="";
}
}
}
//여기에 추가
if(window.attachEvent)window.attachEvent('onload',function(){tab_img_change(1)});else window.addEventListener('load',function(){tab_img_change(1)},false);
</script>

초기이벤트액션을 지정해줍니다. tab_img_change(1)
감사합니다.
적용 잘 하였습니다...
정말.... 감사합니다..
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
15년 전 조회 2,669
15년 전 조회 1,194
15년 전 조회 1,506
15년 전 조회 1,708
15년 전 조회 1,517
15년 전 조회 1,514
15년 전 조회 2,113
15년 전 조회 1,519
15년 전 조회 3,307
15년 전 조회 1,609
15년 전 조회 1,844
15년 전 조회 1,523
15년 전 조회 1,516
15년 전 조회 1,601
15년 전 조회 1,517
15년 전 조회 1,692
15년 전 조회 1,597
15년 전 조회 1,536
15년 전 조회 1,520
15년 전 조회 2,113
🐛 버그신고