01.
function
CheckValidate()
02.
{
03.
04.
for
(i=1;i<=document.frmMain.hdnMaxLine.value;i++)
05.
{
06.
07.
08.
if
(eval(
"document.frmMain.Column1_"
+i+
".value"
)==
""
)
09.
{
10.
alert(
'Please input Column 1 line.. '
+ i);
11.
eval(
"document.frmMain.Column1_"
+i+
".focus();"
)
12.
return
false
;
13.
}
14.
15.
16.
if
(eval(
"document.frmMain.Column2_"
+i+
".value"
)==
""
)
17.
{
18.
alert(
'Please input Column 2 line.. '
+ i);
19.
eval(
"document.frmMain.Column2_"
+i+
".focus();"
)
20.
return
false
;
21.
}
22.
23.
24.
if
(eval(
"document.frmMain.Column3_"
+i+
".value"
)==
""
)
25.
{
26.
alert(
'Please input Column 3 line.. '
+ i);
27.
eval(
"document.frmMain.Column3_"
+i+
".focus();"
)
28.
return
false
;
29.
}
30.
31.
32.
if
(eval(
"document.frmMain.Column4_"
+i+
".value"
)==
""
)
33.
{
34.
alert(
'Please input Column 4 line.. '
+ i);
35.
eval(
"document.frmMain.Column4_"
+i+
".focus();"
)
36.
return
false
;
37.
}
38.
39.
40.
if
(eval(
"document.frmMain.Column5_"
+i+
".value"
)==
""
)
41.
{
42.
alert(
'Please input Column 5 line.. '
+ i);
43.
eval(
"document.frmMain.Column5_"
+i+
".focus();"
)
44.
return
false
;
45.
}
46.
47.
}
48.
49.
}