최근게시물, 새창팝업 왜안될까...ㅠㅠ (해결, 실수ㅠ) 정보
최근게시물, 새창팝업 왜안될까...ㅠㅠ (해결, 실수ㅠ)첨부파일
본문
제가 그누보드의 특정 게시판은 새창으로 띄워야해서..
메뉴에서 직접 링크를 걸 때는
<!-- 새 윈도우 이벤트 -->
<script language="JavaScript">
<!--
function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
toolbar_str = toolbar ? 'yes' : 'no';
menubar_str = menubar ? 'yes' : 'no';
statusbar_str = statusbar ? 'yes' : 'no';
scrollbar_str = scrollbar ? 'yes' : 'no';
resizable_str = resizable ? 'yes' : 'no';
window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}
// -->
</script>
하고 body 내에서
<a href="#" Onclick="na_open_window('open_win', 'board.php?bo_table=news', 0, 0, 720, 700, 1, 0, 1, 1, 1)"><img src="home/images/banner_news.png" class="png24" border="0"></a>
이런식으로 새창 띄우는 소스를 이용해서 했습니다.
그래서 이 최근게시물 소스도
echo 문의 링크 출력부분을 저렇게 원클릭으로 수정해서 했는데
안되는겁니다...
원인을 계속 찾아본결과 알아낸사실은
<a Onclick='<?=$g4[bbs_path]?>어쩌구~~' > 이런식으로 들어가게되먄
오류가나는것 같더라구요.
그럼 제가 첨부한 저 최근게시물은 어떻게 해야 저런 새창으로 띄울수 있을까요...
원인과 해결책을 알려주실분 계신가요 ㅠㅠ
메뉴에서 직접 링크를 걸 때는
<!-- 새 윈도우 이벤트 -->
<script language="JavaScript">
<!--
function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
toolbar_str = toolbar ? 'yes' : 'no';
menubar_str = menubar ? 'yes' : 'no';
statusbar_str = statusbar ? 'yes' : 'no';
scrollbar_str = scrollbar ? 'yes' : 'no';
resizable_str = resizable ? 'yes' : 'no';
window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}
// -->
</script>
하고 body 내에서
<a href="#" Onclick="na_open_window('open_win', 'board.php?bo_table=news', 0, 0, 720, 700, 1, 0, 1, 1, 1)"><img src="home/images/banner_news.png" class="png24" border="0"></a>
이런식으로 새창 띄우는 소스를 이용해서 했습니다.
그래서 이 최근게시물 소스도
echo 문의 링크 출력부분을 저렇게 원클릭으로 수정해서 했는데
안되는겁니다...
원인을 계속 찾아본결과 알아낸사실은
<a Onclick='<?=$g4[bbs_path]?>어쩌구~~' > 이런식으로 들어가게되먄
오류가나는것 같더라구요.
그럼 제가 첨부한 저 최근게시물은 어떻게 해야 저런 새창으로 띄울수 있을까요...
원인과 해결책을 알려주실분 계신가요 ㅠㅠ
댓글 전체
최근 게시물 소스에 <a href.....에 해당하는 부분에 위와 같은 방벙으로 수정하시면 됩니다.
<a href="#" Onclick="na_open_window({$list[$i]['href']}, 'open_win', 0, 0..............
그리고 위 소스와 매치가 안될 수도 있습니다만 다음과 같은 식입니다.
중요한 것은 this.href입니다.
<a href='{$list[$i]['href']}'...... onclick="window.open(this.href, 'popup',..... >
이런식인데... 팝업 옵션은 위와 같이 하시던가 좀 더 찾아보세요.
<a href="#" Onclick="na_open_window({$list[$i]['href']}, 'open_win', 0, 0..............
그리고 위 소스와 매치가 안될 수도 있습니다만 다음과 같은 식입니다.
중요한 것은 this.href입니다.
<a href='{$list[$i]['href']}'...... onclick="window.open(this.href, 'popup',..... >
이런식인데... 팝업 옵션은 위와 같이 하시던가 좀 더 찾아보세요.
아...!
this.href..
이따 집에가서 해봐야겠어요! ㅋ
href에 #넣고 함수안에 경로를 넣는거는 안되더라구요. 왜그런지 대체.. ㅡㅡ;;
둘쨰거로 해보고 되면 채택드릴게요^^;
this.href..
이따 집에가서 해봐야겠어요! ㅋ
href에 #넣고 함수안에 경로를 넣는거는 안되더라구요. 왜그런지 대체.. ㅡㅡ;;
둘쨰거로 해보고 되면 채택드릴게요^^;
이런.... 전에했을때.
php 문 안에 " " 를 넣으면 에러날까바 ' ' 이거로 대체했더니... 그것때문에 오류가 나느거였군요..
전부다 \" 으로 대체하니까 되네요..ㅎㅎ
두번째것은 제가 가진 소스랑 매치를 못시키겠어서 못하겟네요 ㅎㅎ
ㅠㅠ 무튼 감사합니다.
php 문 안에 " " 를 넣으면 에러날까바 ' ' 이거로 대체했더니... 그것때문에 오류가 나느거였군요..
전부다 \" 으로 대체하니까 되네요..ㅎㅎ
두번째것은 제가 가진 소스랑 매치를 못시키겠어서 못하겟네요 ㅎㅎ
ㅠㅠ 무튼 감사합니다.