클릭시 팝업
본문
댓글 첨부파일 출력하는데....
<?php
$file = get_file($bo_table, $list[$i]['wr_id']);
if ($file[0]['view']) { //이미지 파일이면
echo "<div style='width:65px; border: 2px solid #30bb30; margin:0 auto;' id=\"cmt_vc_img\">\n";
echo get_view_thumbnail($file[0]['view'], "65", "");
echo "</div>\n";
} else if (isset($file[0]['source']) && $file[0]['source'] && !$file[0]['view']) { //이미지 파일이 아니면 다운로드
echo "<div id=\"cmt_vc_file\">\n";
$ss_name = 'ss_view_'.$bo_table.'_'.$list[$i]['wr_id'];
if (!get_session($ss_name)) set_session($ss_name, TRUE);
echo "";
echo "</div>\n";
}
?>
이코드가 새탭으로 이지미가 열리는데...
onclick="window.open(this.href,'pop','width=450,height=450, scrollbars=yes');return false;"
이런식으로 팝업으로 열리게 하고 싶습니다.
답변 1
참고만 해 보세요.
<script>
$(function() {
$("a.view_image").click(function() {
window.open(this.href, "large_image", "location=yes,links=no,toolbar=no,top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
return false;
});
</script>
해당 페이지에 위와 같은 소스가 존재하지는 확인해 보시구요,
위애 소스를 해당 페이지 하단에 추가해 보세요.