지역 시도. 시군구 선택
본문
ext1_01 는 db에 저장이 되는데, 'ext2_01'가 저장이 안되는데 소스가 잘못된걸까요?.ㅠㅠ
<script language='javascript'>
<!--
var cnt = new Array();
cnt[0] = new Array('전체');
/*서울*/ cnt[1] = new Array('전체','강남구','강동구','강북구','강서구','관악구','광진구','구로구','금천구','노원구','도봉구','동대문구','동작구','마포구','서대문구','서초구','성동구','성북구','송파구','양천구','영등포구','용산구','은평구','종로구','중구','중랑구');
/*경기*/ cnt[2] = new Array('전체','고양시','과천시','광명시','구리시','군포시','남양주시','동두천시','부천시','성남시','수원시','시흥시','안산시','안양시','오산시','의왕시','의정부시','평택시','하남시','가평군','광주시','김포시','안성시','양주군','양평군','여주군','연천군','용인시','이천군','파주시','포천시','화성시');
/*부산*/ cnt[3] = new Array('전체','강서구','금정구','남구','동구','동래구','부산진구','북구','사상구','사하구','서구','수영구','연제구','영도구','중구','해운대구','기장군');
/*인천*/ cnt[4] = new Array('전체','계양구','남구','남동구','동구','부평구','서구','연수구','중구','강화군','옹진군');
/*광주*/ cnt[5] = new Array('전체','광산구','남구','동구','북구','서구');
/*대전*/ cnt[6] = new Array('전체','대덕구','동구','서구','유성구','중구');
/*울산*/ cnt[7] = new Array('전체','남구','동구','북구','중구','울주군');
/*대구*/ cnt[8] = new Array('전체','남구','달서구','동구','북구','서구','수성구','중구','달성군');
/*세종*/ cnt[9] = new Array('전체','소정면','전의면','연서면','연기면','한솔동','장군면','전동면','조치원읍','연동면','부강면','금남면','도담동');
/*강원*/ cnt[10] = new Array('전체','강릉시','동해시','삼척시','속초시','원주시','춘천시','태백시','고성군','양구군','양양군','영월군','인제군','정선군','철원군','평창군','홍천군','화천군','황성군');
/*충북*/ cnt[11] = new Array('전체','제천시','청주시','충주시','괴산군','단양군','보은군','영동군','옥천군','음성군','진천군','청원군');
/*충남*/ cnt[12] = new Array('전체','공주시','보령시','서산시','아산시','천안시','금산군','논산군','당진군','부여군','서천군','연기군','예산군','청양군','태안군','홍성군');
/*전북*/ cnt[13] = new Array('전체','군산시','김제시','남원시','익산시','전주시','정읍시','고창군','무주군','부안군','순창군','완주군','임실군','장수군','진안군');
/*전남*/ cnt[14] = new Array('전체','광양시','나주시','목포시','순천시','여수시','여천시','강진군','고흥군','곡성군','구례군','담양군','무안군','보성군','신안군','여천군','영광군','영암군','완도군','장성군','장흥군','진도군','함평군','해남군','화순군');
/*경북*/ cnt[15] = new Array('전체','경산시','경주시','구미시','김천시','문경시','상주시','안동시','영주시','영천시','포항시','고령군','군위군','봉화군','성주군','영덕군','영양군','예천군','울릉군','울진군','의성군','청도군','청송군','칠곡군');
/*경남*/ cnt[16] = new Array('전체','거제시','김해시','마산시','밀양시','사천시','울산시','진주시','진해시','창원시','통영시','거창군','고성군','남해군','산청군','양산시','의령군','창녕군','하동군','함안군','함양군','합천군');
/*제주*/ cnt[17] = new Array('전체','서귀포시','제주시','남제주군','북제주군');
function change(add) {
sel=document.fwrite.ext2_01
for (i=sel.length-1; i>=0; i--){
sel.options[i] = null
}
for (i=0; i < cnt[add].length;i++){
sel.options[i] = new Option(cnt[add][i], cnt[add][i]);
}
}
</script>
<select name='ext1_01' required onchange="change(this.selectedIndex);" itemname='시도선택1' class="input frm_input" >
<option value='전체'>시/도</option>
<option value='서울' <? if($ext1_01 == "서울") echo "selected"; ?> >서울</option>
<option value='경기' <? if($ext1_01 == "경기") echo "selected"; ?> >경기</option>
<option value='부산' <? if($ext1_01 == "부산") echo "selected"; ?> >부산</option>
<option value='인천' <? if($ext1_01 == "인천") echo "selected"; ?> >인천</option>
<option value='광주' <? if($ext1_01 == "광주") echo "selected"; ?> >광주</option>
<option value='대전' <? if($ext1_01 == "대전") echo "selected"; ?> >대전</option>
<option value='울산' <? if($ext1_01 == "울산") echo "selected"; ?> >울산</option>
<option value='대구' <? if($ext1_01 == "대구") echo "selected"; ?> >대구</option>
<option value='세종' <? if($ext1_01 == "세종") echo "selected"; ?> >세종</option>
<option value='강원' <? if($ext1_01 == "강원") echo "selected"; ?> >강원</option>
<option value='충북' <? if($ext1_01 == "충북") echo "selected"; ?> >충북</option>
<option value='충남' <? if($ext1_01 == "충남") echo "selected"; ?> >충남</option>
<option value='전북' <? if($ext1_01 == "전북") echo "selected"; ?> >전북</option>
<option value='전남' <? if($ext1_01 == "전남") echo "selected"; ?> >전남</option>
<option value='경북' <? if($ext1_01 == "경북") echo "selected"; ?> >경북</option>
<option value='경남' <? if($ext1_01 == "경남") echo "selected"; ?> >경남</option>
<option value='제주' <? if($ext1_01 == "제주") echo "selected"; ?> >제주</option>
</select>
<select name='ext2_01' class=select>
<option value=''>시/군/구</option>
<? if($write['ext1_01']){ ?>
<option value='<?=$ext2_01?>' selected ><?=$write['ext2_01']?></option>
<? } ?>
</select>
!-->
답변을 작성하시기 전에 로그인 해주세요.