javascript 관련 문의 (셀렉트박스 & 아이프레임)

<tr>
<td class="blog_index">SERIES</td>
<td class="blog_link">
<select id="selSite" onchange="changeSite();">
<option value="#" selected>------------ 연계상품 보러가기 ------------</option>
<?
$tmp_option = explode("[RECORD]",$goods[g_option]);
for($i=1;$i<=count($tmp_option);$i++)
{
$tmpOptVal = explode("[FIELD]",$tmp_option[($i-1)]);
?>
<option value="<?=$tmpOptVal[0]?> : <?=($tmpOptVal[1])?>"><?=$tmpOptVal[0]?> : <?=($tmpOptVal[1])?></option>
<?}?>
</select>
</td>
</tr>
<tr><td colspan="2" height="1" bgcolor="#D7D7D7"></td></tr>
<tr>
<td colspan="2" height="100">
<iframe id="ifrmView" height="350"></iframe>
</td>
</tr>
<script>
function changeSite() {
var idx = document.getElementbyld("selSite").selectedIndex;
var url = document.getElementbyld("selSite").options[idx].value;
//alert(idx)
//alert(url)
document.getElementbyld("ifrmView").src=url;
}
</script>
******************************************************************************
위처럼 셀렉트박스에 g_option 의 내용을 나열하고 선택시 그 내용을 하단 아이프레임에
표시되게 하고싶은데 오류가 납니다.
고수분들의 지도 부탁드립니다.
|

댓글 1개

소스상으론 별문제 없어 보이는데요. 페이지를 볼 수 있음 좋겠네요.
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
13년 전 조회 1,485
13년 전 조회 1,114
13년 전 조회 1,540
13년 전 조회 1,562
13년 전 조회 1,684
13년 전 조회 986
13년 전 조회 917
13년 전 조회 991
13년 전 조회 2,824
13년 전 조회 1,559
13년 전 조회 2,102
13년 전 조회 1,011
13년 전 조회 919
13년 전 조회 1,657
13년 전 조회 1,862
13년 전 조회 985
13년 전 조회 1,014
13년 전 조회 1,637
13년 전 조회 1,271
13년 전 조회 988