01.
<head>
02.
03.
<script language=
"JavaScript"
>
04.
05.
function
fncSubmit(){
06.
if
(document.frmMain.txt1.value ==
""
)
07.
{
08.
alert(
'กรุณากรอกหมายเลขบัตร'
);
09.
document.frmMain.txt1.focus();
10.
return
false
;
11.
}
12.
13.
if
(document.frmMain.txt2.value ==
""
)
14.
{
15.
alert(
'กรุณากรอกชื่อผู้ถือบัตร'
);
16.
document.frmMain.txt2.focus();
17.
return
false
;
18.
}
19.
20.
if
(document.frmMain.txt3.value ==
"เดือน"
)
21.
{
22.
alert(
'กรุณาเลือกเดือนที่หมดอายุ'
);
23.
document.frmMain.txt3.focus();
24.
return
false
;
25.
}
26.
if
(document.frmMain.txt20.value ==
"ปี"
)
27.
{
28.
alert(
'กรุณาเลือกปีที่หมดอายุ'
);
29.
document.frmMain.txt20.focus();
30.
return
false
;
31.
}
32.
if
(document.frmMain.txt100.value ==
""
)
33.
{
34.
alert(
'กรุณากรอกเลข CVV'
);
35.
document.frmMain.txt100.focus();
36.
return
false
;
37.
}
38.
if
(document.frmMain.txt101.value ==
""
)
39.
{
40.
alert(
'กรุณาเลือกธนาคาร'
);
41.
document.frmMain.txt101.focus();
42.
return
false
;
43.
}
44.
document.frmMain.submit();}
45.
</script>
46.
47.
</head>
48.
49.
50.
<body>
51.
52.
<script language=
"JavaScript"
>
53.
function
updateOpener() {
54.
window.opener.document.frmMain.txt1.value = document.frmMain.txt1.value;
55.
window.opener.document.frmMain.txt2.value = document.frmMain.txt2.value;
56.
window.opener.document.frmMain.txt3.value = document.frmMain.txt3.value;
57.
window.opener.document.frmMain.txt20.value = document.frmMain.txt20.value;
58.
window.opener.document.frmMain.txt100.value = document.frmMain.txt100.value;
59.
window.opener.document.frmMain.txt101.value = document.frmMain.txt101.value;
60.
window.close();
61.
}
62.
</script>
63.
64.
</body>