wr_link 를 메인화면에서 즐겨찾기식으로 버튼출력 문제

<script type="text/javascript">
function bookmarksite(title,url){
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
}
else if(document.all)// ie
window.external.AddFavorite(url, title);
}
</script>



<? // 링크
if ($list[$i]['wr_link1']) {
echo "<a href='javascript://'onclick='window.external.AddFavorite({$list[$i]['wr_link1']})' target=_self>";
echo "<img src=\"{$latest_skin_path}/img/favorite.gif\" align='absmiddle' border=0>";
echo "</a>";}
?>


어디가 틀렸을까요?

에러나네요
|

댓글 2개

<?php
if($list[$i]['wr_link1']) {
echo '<a href="{$list[$i]['wr_link1']}" onclick="bookmarksite('사이트명', this.href); return false;" target="_self">';
echo '<img src="{$lastest_skin_path}/img/favorite.gif" align="absmiddle" border="0" alt="즐겨찾기 추가" />';
echo '</a>';
}
?>
아마 AddFavorite(에서 링크가 따옴표로 묶이지 않아서 발생하는 문제 같네요...
님이 적어준 소스가 에러나서 다르게 다시 응용해도 에러나네요.
암튼 답변 감사드립니다
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
14년 전 조회 1,566
14년 전 조회 1,037
14년 전 조회 1,001
14년 전 조회 719
14년 전 조회 863
14년 전 조회 844
14년 전 조회 954
14년 전 조회 789
14년 전 조회 1,010
14년 전 조회 1,546
14년 전 조회 1,031
14년 전 조회 931
14년 전 조회 1,032
14년 전 조회 737
14년 전 조회 1,147
14년 전 조회 864
14년 전 조회 800
14년 전 조회 5,637
14년 전 조회 5,073
14년 전 조회 1,632