Changeset 18357 for branches/comu-ver2/html/user_data
- Timestamp:
- 2009/10/30 19:40:52 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/comu-ver2/html/user_data/packages/default/js/site.js
r18257 r18357 36 36 // 郵便番号入力呼び出し. 37 37 function fnCallAddress(php_url, tagname1, tagname2, input1, input2) { 38 zip1 = document.form1[tagname1].value; 39 zip2 = document.form1[tagname2].value; 40 41 if(zip1.length == 3 && zip2.length == 4) { 42 url = php_url + "?zip1=" + zip1 + "&zip2=" + zip2 + "&input1=" + input1 + "&input2=" + input2; 43 window.open(url,"nomenu","width=500,height=350,scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,status=no"); 44 } else { 45 alert("郵便番号を正しく入力して下さい。"); 38 zip1 = document.form1[tagname1].value; 39 zip2 = document.form1[tagname2].value; 40 41 if(zip1.length == 3 && zip2.length == 4) { 42 $.get( 43 php_url, 44 {zip1: zip1, zip2: zip2, input1: input1, input2: input2}, 45 function(data) { 46 arrdata = data.split("|"); 47 if (arrdata.length > 1) { 48 fnPutAddress(input1, input2, arrdata[0], arrdata[1], arrdata[2]); 49 } else { 50 alert(data); 51 } 52 } 53 ); 54 } else { 55 alert("郵便番号を正しく入力して下さい。"); 46 56 } 47 57 } 48 58 49 59 // 郵便番号から検索した住所を渡す. 50 function fnPutAddress(input1, input2) { 51 // 親ウィンドウの存在確認。. 52 if(fnIsopener()) { 53 if(document.form1['state'].value != "") { 54 // 項目に値を入力する. 55 state_id = document.form1['state'].value; 56 town = document.form1['city'].value + document.form1['town'].value; 57 window.opener.document.form1[input1].selectedIndex = state_id; 58 window.opener.document.form1[input2].value = town; 59 } 60 } else { 61 window.close(); 62 } 60 function fnPutAddress(input1, input2, state, city, town) { 61 if(state != "") { 62 // 項目に値を入力する. 63 document.form1[input1].selectedIndex = state; 64 document.form1[input2].value = city + town; 65 } 63 66 } 64 67 … … 79 82 // セレクトボックスに項目を割り当てる. 80 83 function fnSetSelect(name1, name2, val) { 81 sele1 = document.form1[name1]; 84 sele1 = document.form1[name1]; 82 85 sele2 = document.form1[name2]; 83 86 84 87 if(sele1 && sele2) { 85 88 index=sele1.selectedIndex; 86 87 // セレクトボックスのクリア 89 90 // セレクトボックスのクリア 88 91 count=sele2.options.length 89 92 for(i = count; i >= 0; i--) { 90 93 sele2.options[i]=null; 91 94 } 92 95 93 96 // セレクトボックスに値を割り当てる。 94 97 len = lists[index].length … … 163 166 return; 164 167 } 165 break; 168 break; 166 169 default: 167 170 break; … … 214 217 'use_point' 215 218 ); 216 219 217 220 if(!document.form1['point_check'][0].checked) { 218 221 color = "#dddddd"; … … 222 225 flag = false; 223 226 } 224 227 225 228 len = list.length 226 229 for(i = 0; i < len; i++) { … … 253 256 'deliv_tel03' 254 257 ); 255 258 256 259 if(!document.form1['deliv_check'].checked) { 257 260 fnChangeDisabled(list, '#dddddd'); … … 286 289 function fnChangeDisabled(list, color) { 287 290 len = list.length; 288 291 289 292 for(i = 0; i < len; i++) { 290 293 if(document.form1[list[i]]) { … … 297 300 document.form1[list[i]].disabled = true; 298 301 g_savecolor[list[i]] = document.form1[list[i]].style.backgroundColor; 299 document.form1[list[i]].style.backgroundColor = color;//"#f0f0f0"; 300 } 302 document.form1[list[i]].style.backgroundColor = color;//"#f0f0f0"; 303 } 301 304 } 302 305 } … … 307 310 function fnCheckLogin(formname) { 308 311 var lstitem = new Array(); 309 312 310 313 if(formname == 'login_mypage'){ 311 314 lstitem[0] = 'mypage_login_email'; … … 318 321 var errflg = false; 319 322 var cnt = 0; 320 323 321 324 // 必須項目のチェック 322 325 for(cnt = 0; cnt < max; cnt++) { … … 326 329 } 327 330 } 328 329 // 必須項目が入力されていない場合 331 332 // 必須項目が入力されていない場合 330 333 if(errflg == true) { 331 334 alert('メールアドレス/パスワードを入力して下さい。'); … … 333 336 } 334 337 } 335 338 336 339 // 時間の計測. 337 340 function fnPassTime(){ … … 349 352 } else { 350 353 window.close(); 351 } 354 } 352 355 } 353 356 … … 371 374 // テキストエリアのサイズを変更する. 372 375 function ChangeSize(button, TextArea, Max, Min, row_tmp){ 373 376 374 377 if(TextArea.rows <= Min){ 375 378 TextArea.rows=Max; button.value="小さくする"; row_tmp.value=Max;
Note: See TracChangeset
for help on using the changeset viewer.
