PageSourceSearch

https://www.aec-inc.jp/contact/common.js

js aec-inc.jp collected 2026-10-08 01:15:54 UTC 3,240 bytes, 111 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 i;
21 var flag = 1;
22 if(!f.issue.value){
23  for(i = 0; i < f.issue.length; i ++){
24   if(f.issue[i].checked){
25    flag = 0; break;
26   }
27  }
28  if(flag == 1){
29   error_mes += "・お問い合わせ種別を選択してください。\r\n";flg = true;
30  }
31 }
32 var radio2 = document.getElementsByName('issue');
33 var radiochecked2 ='';
34 for (var i = 0, length = radio2.length; i < length; i++) 
35 {
36   if (radio2[i].checked) 
37  {
38     radiochecked2 =radio2[i].value;   
39  }
40 }
41 if(radiochecked2 =="その他" && !f.issue_text.value){
42
43  error_mes += "・お問い合わせ種別(その他)を入力してください。\r\n";flg = true;
44 }
45
46	if(!f.comp.value){
47		error_mes += "・企業名を入力してください。\r\n";flg = true;
48	}	
49	if(!f.name.value){
50		error_mes += "・名前を入力してください。\r\n";flg = true;
51	}
52
53	if(!f.kana.value){
54		error_mes += "・フリガナを入力してください。\r\n";flg = true;
55	}	
56var email_flg = false;
57if (!f.email.value) {
58    error_mes += "・メールアドレスを入力してください。\r\n";
59    flg = true;
60} else if (!f.email.value.match(/^[^@]+@[^.]+\..+/)) {
61    error_mes += "・メールアドレスの形式に誤りがあります。\r\n";
62    flg = true;
63} else {
64    email_flg = true;
65}
66
67if (email_flg) {
68    var email02_flg = false;
69    if (!f.email02.value) {
70        error_mes += "・メールアドレス(確認用)を入力してください。\r\n";
71        flg = true;
72    } else if (!f.email02.value.match(/^[^@]+@[^.]+\..+/)) {
73        error_mes += "・メールアドレス(確認用)の形式に誤りがあります。\r\n";
74        flg = true;
75    } else {
76        email02_flg = true;
77    }
78
79    if (email_flg && email02_flg) {
80        if (f.email.value != f.email02.value) {
81            error_mes += "・メールアドレスとメールアドレス(確認用)が一致しません。\r\n";
82            flg = true;
83        }
84    }
85}	
86	if(!f.comment.value){
87		error_mes += "・お問い合わせ内容を入力してください。\r\n";flg = true;
88	}	
89	
90if(!confirm_flg)
91{
92    if(!f.agreement.checked){
93        error_mes += "・「個人情報保護方針」の内容に同意されておりません。\r\n";flg = true;
94    }
95}	
96
97	// 判定
98	if(flg){
99		// アラート表示して再入力を警告
100		window.alert(error_mes);return false;
101	}
102	else{
103
104		// 確認メッセージ
105		if(confirm_flg){
106			return ConfirmMsg('入力いただいた内容で送信します。\nよろしいですか?');
107		}
108		return true;
109	}
110
111}

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.