마우스오버문제.입니다. 정보
마우스오버문제.입니다.
본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 : http://endurakorea.com/brandnew/bbs/board.php?bo_table=product11&wr_id=24
원본 : http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=27603&sca=&sfl=wr_subject&stx=%C1%A6%C7%B0&sop=and
스킨을 사용하기 있는데요 이미지 4개를 올려야 해서 아래와 같이 수정하였더니
맨위의 그림에 마우스 오버가 작동하지 않습니다. 어떻게 해결해야 할까요?
고수님들의 답변 바랍니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<script>
//Table Size 조정
function ImageResizing(objFrame) {
if (!objFrame) return;
//height 조정
var conversionSize = 380;
var orgWidth = objFrame.width;
var orgHeight = objFrame.height;
if (( orgWidth > conversionSize) || (orgHeight > conversionSize)){
if (orgWidth > orgHeight){
newWidth = conversionSize;
newHeight = Math.round((conversionSize * orgHeight)/orgWidth);
}else{
newWidth = Math.round((conversionSize * orgWidth)/orgHeight);
newHeight = conversionSize;
}
objFrame.width = newWidth;
objFrame.height = newHeight;
}
}
function ThumbViewer(ImageObj){
if (ImageObj.src == "http://pics.auction.co.kr/buy/itempage/no_image_thumb.gif") return;
//ThumbImage0.style.border = "silver 1px solid";
//ThumbImage1.style.border = "silver 1px solid";
//ThumbImage2.style.border = "silver 1px solid";
if (ThumbImage1 == ImageObj){
img0.style.display = "none";
img1.style.display = "";
img2.style.display = "none";
img3.style.display = "none";
ImageResizing(img1);
}
else if (ThumbImage2 == ImageObj){
img0.style.display = "none";
img1.style.display = "none";
img2.style.display = "";
img3.style.display = "none";
ImageResizing(img2);
}
else if (ThumbImage3 == ImageObj){
img0.style.display = "none";
img1.style.display = "none";
img2.style.display = "none";
img3.style.display = "";
ImageResizing(img3);
}
else (ThumbImage0 == ImageObj)
{
img0.style.display = "";
img1.style.display = "none";
img2.style.display = "none";
img3.style.display = "none";
ImageResizing(img0);
}
}
</script>
<?
//$img = "$g4[path]/data/file/$bo_table/".urlencode($view[file][0][file]);
//if (!file_exists($img) || !$view[file][0][file]) $img = "$board_skin_path/img/progress/no_image.gif";
?>
<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 링크 버튼 -->
<?
ob_start();
?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=35>
<td width=75%>
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_search_list.gif' border='0' align='absmiddle'></a> "; } ?>
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle'></a> "; ?>
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/btn_write.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/btn_reply.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/btn_update.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_delete.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_good.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_nogood.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('./scrap_popin.php?bo_table=$bo_table&wr_id=$wr_id');\"><img src='$board_skin_path/img/btn_scrap.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/btn_copy.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/btn_move.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
<td width=25% align=right>
<? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/btn_prev.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/btn_next.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
</tr>
</table>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>
<table width="100%" cellspacing="0" cellpadding="0">
<!-- <tr><td height=2 bgcolor=#B0ADF5></td></tr> -->
<tr>
<td height="10"> </td>
</tr>
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="306" align="center" valign="middle"><table width="304" border="1" cellpadding="0" cellspacing="0" bordercolor="cccccc">
<tr>
<td height="100%" align="center"><table width="280" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="210"><?
// 파일 출력
$sql = "select * from $g4[board_file_table] where `bo_table`='$bo_table' and `wr_id`='$wr_id'";
$result=mysql_query($sql);
for($i=0 ; $row = mysql_fetch_array($result) ; $i++){
if($i > 0){
$style= "style=\"display:none\"";
}
echo "<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=210 height=310 border=0 id=img$i $style>";
$thumimg[$i]="<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=60 height=70 border=0 id=ThumbImage$i onfocus=\"this.blur()\" onMouseOver=\"javascript:ThumbViewer(this)\">";
}
?></td>
<td width="70" align="center" valign="bottom"><?
echo $thumimg[0];
echo $thumimg[1];
echo $thumimg[2];
echo $thumimg[3];
?></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="10"></td>
<td align="center" valign="bottom">
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><font color="f15824" face="Times New Roman, Times, serif"><?php echo $view[wr_1] ?></font></td>
</tr>
<tr>
<td><font color="f15824"><strong><font size="+3" face="Times New Roman, Times, serif"><?php echo $view[subject] ?></font></strong></font></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="d1d3d4">
<!-- 추가필드시작-->
<!-- <tr><td height=1 bgcolor=#E7E7E7></td></tr> -->
<tr><td height=25 > 제 품 명 : <?php echo $view[subject] ?></td>
</tr>
<tr>
<td height=25 > 제품구분 : <?php echo $view[wr_1] ?></td>
</tr>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
<tr>
<td height=25 > 판 매 가 : <?php echo $view[wr_2] ?> 원</td>
</tr>
<tr>
<td height=25 > 사 이 즈 :
<?=$view[wr_3]?> </td>
</tr><tr>
<td height=25 > 스 타 일 :
<?=$view[wr_4]?> </td>
</tr><tr>
<td height=25 > 재고여부 : <?php echo $view[wr_5] ?></td>
</tr>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
<!-- 추가필드끝-->
</table> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="30"> </td>
</tr>
</table>
<!-- 박스 시작-->
<table border="0" cellpadding="0" cellspacing="0" width="620">
<tr>
<td width="620" height="154">
<table border="0" cellpadding="0" cellspacing="0" width="622" height="152">
<tr>
<td width="21" bgcolor="white" height="1"><img src="<?=$board_skin_path?>/img/submeno.gif" border="0"></td>
<td width="600" height="1" bgcolor="9aa483"><strong><font color="#FFFFFF">상세설명</font></strong></td>
<td width="1" bgcolor="white" height="1"></td>
</tr>
<tr>
<td width="21"></td>
<td width="600" height="152" valign="top">
<table border="0" cellpadding="3" cellspacing="0" width="298" height="152">
<tr>
<td width="290" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="600" height="148" align="center">
<tr>
<td width="600" height="148" bgcolor="white" valign="top" align="center"><table border="0" width="600" cellpadding="5" cellspacing="0">
<tr>
<td width="600"><span class="ct lh">
<?=$view[content];?>
</span></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</td>
<td width="1"></td>
</tr>
<tr>
<td width="21" bgcolor="white" height="1"><img src="<?=$board_skin_path?>/img/submeno.gif" border="0"></td>
<td width="600" height="1" bgcolor="9aa483"><strong><font color="#FFFFFF">Review</font></strong></td>
<td width="1" bgcolor="white" height="1"></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- 박스 끝-->
</td></tr>
<!-- <tr><td height=1 bgcolor=#E7E7E7></td></tr> -->
<?
// 링크
$cnt = 0;
for ($i=1; $i<=$g4[link_count]; $i++)
{
if ($view[link][$i])
{
$cnt++;
$link = cut_str($view[link][$i], 70);
echo "<tr><td height=30> <img src='{$board_skin_path}/img/homepagemake_icon.gif' align=absmiddle> 홈페이지 : <a href='{$view[link_href][$i]}' target=_blank>{$link} ({$view[link_hit][$i]})</a></td></tr><tr><td height=1 bgcolor=#E7E7E7></td></tr>";
}
}
?>
<tr>
<td>
<?//echo $view[rich_content]; // 과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
<? if ($is_signature) { echo "<br>$signature<br><br>"; } // 서명 출력 ?></td>
</tr>
</table><br>
<?
include_once("./view_comment.php");
?>
<?=$link_buttons?>
</td></tr></table><br>
<script language="JavaScript">
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
var target = document.getElementsByName('target_resize_image[]');
var image_width = parseInt('<?=$board[bo_image_width]?>');
var image_height = 0;
for(i=0; i<target.length; i++) {
// 원래 사이즈를 저장해 놓는다
target[i].tmp_width = target[i].width;
target[i].tmp_height = target[i].height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(target[i].width > image_width) {
image_height = parseFloat(target[i].width / target[i].height)
target[i].width = image_width;
target[i].height = parseInt(image_width / image_height);
}
}
}
window.onload = resize_image;
</script>
<!-- 게시글 보기 끝 -->
오류 주소 : http://endurakorea.com/brandnew/bbs/board.php?bo_table=product11&wr_id=24
원본 : http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=27603&sca=&sfl=wr_subject&stx=%C1%A6%C7%B0&sop=and
스킨을 사용하기 있는데요 이미지 4개를 올려야 해서 아래와 같이 수정하였더니
맨위의 그림에 마우스 오버가 작동하지 않습니다. 어떻게 해결해야 할까요?
고수님들의 답변 바랍니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<script>
//Table Size 조정
function ImageResizing(objFrame) {
if (!objFrame) return;
//height 조정
var conversionSize = 380;
var orgWidth = objFrame.width;
var orgHeight = objFrame.height;
if (( orgWidth > conversionSize) || (orgHeight > conversionSize)){
if (orgWidth > orgHeight){
newWidth = conversionSize;
newHeight = Math.round((conversionSize * orgHeight)/orgWidth);
}else{
newWidth = Math.round((conversionSize * orgWidth)/orgHeight);
newHeight = conversionSize;
}
objFrame.width = newWidth;
objFrame.height = newHeight;
}
}
function ThumbViewer(ImageObj){
if (ImageObj.src == "http://pics.auction.co.kr/buy/itempage/no_image_thumb.gif") return;
//ThumbImage0.style.border = "silver 1px solid";
//ThumbImage1.style.border = "silver 1px solid";
//ThumbImage2.style.border = "silver 1px solid";
if (ThumbImage1 == ImageObj){
img0.style.display = "none";
img1.style.display = "";
img2.style.display = "none";
img3.style.display = "none";
ImageResizing(img1);
}
else if (ThumbImage2 == ImageObj){
img0.style.display = "none";
img1.style.display = "none";
img2.style.display = "";
img3.style.display = "none";
ImageResizing(img2);
}
else if (ThumbImage3 == ImageObj){
img0.style.display = "none";
img1.style.display = "none";
img2.style.display = "none";
img3.style.display = "";
ImageResizing(img3);
}
else (ThumbImage0 == ImageObj)
{
img0.style.display = "";
img1.style.display = "none";
img2.style.display = "none";
img3.style.display = "none";
ImageResizing(img0);
}
}
</script>
<?
//$img = "$g4[path]/data/file/$bo_table/".urlencode($view[file][0][file]);
//if (!file_exists($img) || !$view[file][0][file]) $img = "$board_skin_path/img/progress/no_image.gif";
?>
<!-- 게시글 보기 시작 -->
<table width="<?=$width?>" align="center" cellpadding="0" cellspacing="0"><tr><td>
<!-- 링크 버튼 -->
<?
ob_start();
?>
<table width='100%' cellpadding=0 cellspacing=0>
<tr height=35>
<td width=75%>
<? if ($search_href) { echo "<a href=\"$search_href\"><img src='$board_skin_path/img/btn_search_list.gif' border='0' align='absmiddle'></a> "; } ?>
<? echo "<a href=\"$list_href\"><img src='$board_skin_path/img/btn_list.gif' border='0' align='absmiddle'></a> "; ?>
<? if ($write_href) { echo "<a href=\"$write_href\"><img src='$board_skin_path/img/btn_write.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($reply_href) { echo "<a href=\"$reply_href\"><img src='$board_skin_path/img/btn_reply.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($update_href) { echo "<a href=\"$update_href\"><img src='$board_skin_path/img/btn_update.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($delete_href) { echo "<a href=\"$delete_href\"><img src='$board_skin_path/img/btn_delete.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($good_href) { echo "<a href=\"$good_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_good.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($nogood_href) { echo "<a href=\"$nogood_href\" target='hiddenframe'><img src='$board_skin_path/img/btn_nogood.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($scrap_href) { echo "<a href=\"javascript:;\" onclick=\"win_scrap('./scrap_popin.php?bo_table=$bo_table&wr_id=$wr_id');\"><img src='$board_skin_path/img/btn_scrap.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($copy_href) { echo "<a href=\"$copy_href\"><img src='$board_skin_path/img/btn_copy.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($move_href) { echo "<a href=\"$move_href\"><img src='$board_skin_path/img/btn_move.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
<td width=25% align=right>
<? if ($prev_href) { echo "<a href=\"$prev_href\" title=\"$prev_wr_subject\"><img src='$board_skin_path/img/btn_prev.gif' border='0' align='absmiddle'></a> "; } ?>
<? if ($next_href) { echo "<a href=\"$next_href\" title=\"$next_wr_subject\"><img src='$board_skin_path/img/btn_next.gif' border='0' align='absmiddle'></a> "; } ?>
</td>
</tr>
</table>
<?
$link_buttons = ob_get_contents();
ob_end_flush();
?>
<table width="100%" cellspacing="0" cellpadding="0">
<!-- <tr><td height=2 bgcolor=#B0ADF5></td></tr> -->
<tr>
<td height="10"> </td>
</tr>
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="306" align="center" valign="middle"><table width="304" border="1" cellpadding="0" cellspacing="0" bordercolor="cccccc">
<tr>
<td height="100%" align="center"><table width="280" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="210"><?
// 파일 출력
$sql = "select * from $g4[board_file_table] where `bo_table`='$bo_table' and `wr_id`='$wr_id'";
$result=mysql_query($sql);
for($i=0 ; $row = mysql_fetch_array($result) ; $i++){
if($i > 0){
$style= "style=\"display:none\"";
}
echo "<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=210 height=310 border=0 id=img$i $style>";
$thumimg[$i]="<img src =$g4[path]/data/file/$bo_table/$row[bf_file] width=60 height=70 border=0 id=ThumbImage$i onfocus=\"this.blur()\" onMouseOver=\"javascript:ThumbViewer(this)\">";
}
?></td>
<td width="70" align="center" valign="bottom"><?
echo $thumimg[0];
echo $thumimg[1];
echo $thumimg[2];
echo $thumimg[3];
?></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="10"></td>
<td align="center" valign="bottom">
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><font color="f15824" face="Times New Roman, Times, serif"><?php echo $view[wr_1] ?></font></td>
</tr>
<tr>
<td><font color="f15824"><strong><font size="+3" face="Times New Roman, Times, serif"><?php echo $view[subject] ?></font></strong></font></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="d1d3d4">
<!-- 추가필드시작-->
<!-- <tr><td height=1 bgcolor=#E7E7E7></td></tr> -->
<tr><td height=25 > 제 품 명 : <?php echo $view[subject] ?></td>
</tr>
<tr>
<td height=25 > 제품구분 : <?php echo $view[wr_1] ?></td>
</tr>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
<tr>
<td height=25 > 판 매 가 : <?php echo $view[wr_2] ?> 원</td>
</tr>
<tr>
<td height=25 > 사 이 즈 :
<?=$view[wr_3]?> </td>
</tr><tr>
<td height=25 > 스 타 일 :
<?=$view[wr_4]?> </td>
</tr><tr>
<td height=25 > 재고여부 : <?php echo $view[wr_5] ?></td>
</tr>
<tr><td height=1 bgcolor=#E7E7E7></td></tr>
<!-- 추가필드끝-->
</table> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="30"> </td>
</tr>
</table>
<!-- 박스 시작-->
<table border="0" cellpadding="0" cellspacing="0" width="620">
<tr>
<td width="620" height="154">
<table border="0" cellpadding="0" cellspacing="0" width="622" height="152">
<tr>
<td width="21" bgcolor="white" height="1"><img src="<?=$board_skin_path?>/img/submeno.gif" border="0"></td>
<td width="600" height="1" bgcolor="9aa483"><strong><font color="#FFFFFF">상세설명</font></strong></td>
<td width="1" bgcolor="white" height="1"></td>
</tr>
<tr>
<td width="21"></td>
<td width="600" height="152" valign="top">
<table border="0" cellpadding="3" cellspacing="0" width="298" height="152">
<tr>
<td width="290" valign="top"><table border="0" cellpadding="0" cellspacing="0" width="600" height="148" align="center">
<tr>
<td width="600" height="148" bgcolor="white" valign="top" align="center"><table border="0" width="600" cellpadding="5" cellspacing="0">
<tr>
<td width="600"><span class="ct lh">
<?=$view[content];?>
</span></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</td>
<td width="1"></td>
</tr>
<tr>
<td width="21" bgcolor="white" height="1"><img src="<?=$board_skin_path?>/img/submeno.gif" border="0"></td>
<td width="600" height="1" bgcolor="9aa483"><strong><font color="#FFFFFF">Review</font></strong></td>
<td width="1" bgcolor="white" height="1"></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- 박스 끝-->
</td></tr>
<!-- <tr><td height=1 bgcolor=#E7E7E7></td></tr> -->
<?
// 링크
$cnt = 0;
for ($i=1; $i<=$g4[link_count]; $i++)
{
if ($view[link][$i])
{
$cnt++;
$link = cut_str($view[link][$i], 70);
echo "<tr><td height=30> <img src='{$board_skin_path}/img/homepagemake_icon.gif' align=absmiddle> 홈페이지 : <a href='{$view[link_href][$i]}' target=_blank>{$link} ({$view[link_hit][$i]})</a></td></tr><tr><td height=1 bgcolor=#E7E7E7></td></tr>";
}
}
?>
<tr>
<td>
<?//echo $view[rich_content]; // 과 같은 코드를 사용할 경우?>
<!-- 테러 태그 방지용 --></xml></xmp><a href=""></a><a href=''></a>
<? if ($is_signature) { echo "<br>$signature<br><br>"; } // 서명 출력 ?></td>
</tr>
</table><br>
<?
include_once("./view_comment.php");
?>
<?=$link_buttons?>
</td></tr></table><br>
<script language="JavaScript">
// HTML 로 넘어온 <img ... > 태그의 폭이 테이블폭보다 크다면 테이블폭을 적용한다.
function resize_image()
{
var target = document.getElementsByName('target_resize_image[]');
var image_width = parseInt('<?=$board[bo_image_width]?>');
var image_height = 0;
for(i=0; i<target.length; i++) {
// 원래 사이즈를 저장해 놓는다
target[i].tmp_width = target[i].width;
target[i].tmp_height = target[i].height;
// 이미지 폭이 테이블 폭보다 크다면 테이블폭에 맞춘다
if(target[i].width > image_width) {
image_height = parseFloat(target[i].width / target[i].height)
target[i].width = image_width;
target[i].height = parseInt(image_width / image_height);
}
}
}
window.onload = resize_image;
</script>
<!-- 게시글 보기 끝 -->
댓글 전체