Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Pado
Behira Younes
Commits
09f336a1
Commit
09f336a1
authored
Oct 27, 2020
by
Ratnadeep Rajendra Kharade
Browse files
handled error case when no value is selected
parent
4289ad1a
Pipeline
#1086
passed with stages
in 17 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
public/index.html
View file @
09f336a1
...
...
@@ -63,7 +63,7 @@
<div>
<label
for=
"readerLevel"
>
Reader Level:
</label>
<select
class=
"box-input"
id=
"readerLevel"
onchange=
"readerLevelChangeEvent(event)"
>
<option
value=
""
>
Select level
</option>
<option
value=
"
0
"
>
Select level
</option>
<option
value=
"1"
>
First Year
</option>
<option
value=
"2"
>
Second Year
</option>
<option
value=
"3"
>
Third Year
</option>
...
...
@@ -74,7 +74,7 @@
<div>
<label
for=
"readerCategory"
>
Reader Category:
</label>
<select
class=
"box-input"
id=
"readerCategory"
onchange=
"readerCategoryChangeEvent(event)"
>
<option
value=
""
>
Select category
</option>
<option
value=
"
0
"
>
Select category
</option>
<option
value=
"1"
>
Mixed-ability group
</option>
<option
value=
"2"
>
High-ability group
</option>
<option
value=
"3"
>
Good-ability group
</option>
...
...
public/index.js
View file @
09f336a1
...
...
@@ -80,14 +80,14 @@ function isFormValid() {
document
.
getElementById
(
'
textCharacters-validation
'
).
style
.
display
=
'
none
'
;
}
if
(
inputObj
.
readerLevel
===
''
)
{
if
(
inputObj
.
readerLevel
===
''
||
inputObj
.
readerLevel
===
0
)
{
invalidFields
++
;
document
.
getElementById
(
'
readerLevel-validation
'
).
style
.
display
=
'
block
'
;
}
else
{
document
.
getElementById
(
'
readerLevel-validation
'
).
style
.
display
=
'
none
'
;
}
if
(
inputObj
.
readerCategory
===
''
)
{
if
(
inputObj
.
readerCategory
===
''
||
inputObj
.
readerCategory
===
0
)
{
invalidFields
++
;
document
.
getElementById
(
'
readerCategory-validation
'
).
style
.
display
=
'
block
'
;
}
else
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment