Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tom Dwelly
speccy
Commits
0e4e1d20
Commit
0e4e1d20
authored
Jun 18, 2020
by
Tom Dwelly
Browse files
grey out submit button on success
parent
7f6ac2cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/speccy.js
View file @
0e4e1d20
...
...
@@ -1069,7 +1069,9 @@ function submitVIinfo(){
var
success_text
=
"
Success!
"
;
if
(
XHR
.
responseText
.
substring
(
0
,
success_text
.
length
)
===
success_text
)
{
//add a pip to the submission button
document
.
getElementById
(
"
submitButton
"
).
value
+=
"
.
"
;
button
=
document
.
getElementById
(
"
submitButton
"
);
button
.
value
+=
"
.
"
;
button
.
style
.
background
=
"
rgba(128,128,128,0.5)
"
;
//grey out the button
}
else
{
alert
(
'
Error! Something went badly wrong when submitting your results (see console for details).
'
);
console
.
log
(
XHR
.
responseText
);
//debug output for those who are interested
...
...
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