이게 호출이 안되네요.. 문제점이 뭔가요? 채택완료
따라하기
9년 전
조회 4,050
</p><p>function showLayer(ObShow, bo_table, fn, wr_id) {
document.getElementById(ObShow).style.visibility="visible";
document.write(" <div id='Layer1'> ");
document.write(" <a href=\"javascript:hideLayer('Layer1');\" name='ly1' value='hide 1'>close</a> ");
document.write("
");
document.write(" </div> ");
var img_url = "../data/file/'+bo_table+'/'+wr_id+'/'+fn+";
document.write ( "<img src="+img_url+" width=600 />" );
}</p><p>
</p><p><a href="javascript:showLayer('Layer1', <?php echo $bo_table ?>, <?php echo $img_file ?>, <?php echo $row['wr_id'] ?>);"></p><p>
댓글을 작성하려면 로그인이 필요합니다.
답변 4개
채택된 답변
+20 포인트
9년 전
</p><p><script type="text/javascript">
function showLayer(ObShow, bo_table, fn, wr_id) {</p><p> var img_url = "../data/file/" + bo_table + "/" + wr_id + "/" + fn;
document.getElementById(ObShow).style.visibility = "visible";
document.write(" <div id='Layer1'> ");
document.write(" <a href=\"javascript:hideLayer('Layer1');\" name='ly1' value='hide 1'>close</a> ");
document.write("
");
document.write(" </div> ");
document.write ( "<img src=" + img_url + " width='600' />" );
}
</script></p><p><a href="javascript:showLayer('Layer1', '<?php echo $bo_table ?>', '<?php echo $img_file ?>', '<?php echo $row['wr_id'] ?>');"></p><p>
string(문자열)의 경우는 전부 따옴표로 감싸야 합니다.
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
9년 전
해결 방법 찾았습니다...
</p><p>function hideLayer(ObHide) {</p><p>document.getElementById(ObHide).style.visibility="hidden";</p><p>}</p><p>function showLayer(bo_table, fn, wr_id) {</p><p>document.write("<div id='Layer1'> ");</p><p>document.write("<a href=\"javascript:hideLayer('Layer1');\" name='ly1' value='hide 1'>close</a>");</p><p>document.write("
");</p><p>var img_url = "../data/file/"+bo_table+"/"+wr_id+"/"+fn;</p><p>document.write( "<img src="+img_url+" width=600 />");</p><p>document.write("</div>");</p><p>}</p><div>
ObShow 삭제
document.getElementById(ObShow).style.visibility="visible"; 삭제
ver img_url 랑 바로 밑에있던 write 위치 변경
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
9년 전
</p><p>function showLayer(ObShow, bo_table, fn, wr_id) {</p><p>document.getElementById(ObShow).style.visibility="visible";</p><p>document.write("<div id='Layer1'> ");</p><p>document.write("<a href=\"javascript:hideLayer('Layer1');\" name='ly1' value='hide 1'>close</a>");</p><p>document.write("
");</p><p>document.write("</div>"); </p><p><code class="keyword" style="font-size: 14.004px; line-height: 25.2072px; letter-spacing: -0.01px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-weight: bold !important; color: rgb(0, 102, 153) !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">//var</code><span style="font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; font-size: 14.004px; letter-spacing: -0.01px; line-height: 25.2072px; background-color: rgb(255, 255, 255);"> </span><code class="plain" style="font-size: 14.004px; line-height: 25.2072px; letter-spacing: -0.01px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">img_url = </code><code class="string" style="font-size: 14.004px; line-height: 25.2072px; letter-spacing: -0.01px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; color: blue !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">"../data/file/'+bo_table+'/'+wr_id+'/'+fn+"</code><code class="plain" style="font-size: 14.004px; line-height: 25.2072px; letter-spacing: -0.01px; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(255, 255, 255); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">;</code> </p><p>var img_url = "../data/file/"+bo_table+"/"+wr_id+"/"+fn;</p><p>document.write( "<img src="+img_url+" width=600 />");</p><p>}</p><p>
이렇게 되어야 하는거 아닌가요 ?
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인