PageSourceSearch

https://www.naturalwine.jp/contact/common.js

js naturalwine.jp collected 2026-10-08 16:08:20 UTC 2,479 bytes, 78 lines download raw bytes

1// JavaScript Document
2
3/////////////////////////////////////
4// 汎用確認メッセージ
5/////////////////////////////////////
6function ConfirmMsg(msg){
7	return (confirm(msg))?true:false;
8}
9
10/////////////////////////////////////////////////////////////////////////////////
11// 未入力及び不正入力のチェック(※Safariのバグ(エスケープ文字認識)を回避)
12/////////////////////////////////////////////////////////////////////////////////
13function inputChk(f,confirm_flg){
14
15	// フラグの初期化
16	var flg = false;
17	var error_mes = "Error Message\r\n恐れ入りますが、下記の内容をご確認ください。\r\n\r\n";
18
19	// 未入力と不正入力のチェック
20	var flag=1;
21	for (var i=0;i<f.elements.length;i++){
22		if ((f.elements[i].name=="issue02[]") && (f.elements[i].checked)) {flag = 0; break;}
23		if ((f.elements[i].name=="issue02[]" && confirm_flg) && (f.elements[i].value)) {flag = 0; break;}
24	}
25	if(flag == 1){ error_mes += "・お問い合わせ項目をご選択ください。\r\n";flg = true; }
26
27	if(!f.name.value){
28		error_mes += "・お名前・ご担当者名をご記入ください。\r\n";flg = true;
29	}
30	
31	if(!f.email.value){
32		error_mes += "・メールアドレスをご記入ください。\r\n";flg = true;
33	}
34	else if(!f.email.value.match(/^[^@]+@[^.]+\..+/)){
35		error_mes += "・メールアドレスの形式に誤りがあります。\r\n";flg = true;
36	}
37	
38	if(!f.tel.value){
39		error_mes += "・お電話番号をご記入ください。\r\n";flg = true;
40	}
41	var checkbox = document.getElementsByName('issue02[]');
42	for (var i = 0, length = checkbox.length; i < length; i++) 
43	{
44		 if (checkbox[i].checked && checkbox[i].value =="資料請求について") 
45		 {
46			if(!f.zip.value){
47				error_mes += "・郵便番号をご記入ください。\r\n";flg = true;
48			}
49			
50			if(!f.state.value){
51				error_mes += "・都道府県名をご選択ください。\r\n";flg = true;
52			}
53
54			if(!f.address.value){
55				error_mes += "・ご住所をご記入ください。\r\n";flg = true;
56			}
57		 }
58	}
59	
60	if(!f.comment.value){
61		error_mes += "・お問い合わせ内容をご記入ください。\r\n";flg = true;
62	}
63
64	// 判定
65	if(flg){
66		// アラート表示して再入力を警告
67		window.alert(error_mes);return false;
68	}
69	else{
70
71		// 確認メッセージ
72		if(confirm_flg){
73			return ConfirmMsg('ご入力いただいた内容で送信します。\nよろしいですか?');
74		}
75		return true;
76	}
77
78}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.