Commit ab3fa61b81bdc162938c81caf3cd7784d40d609d
1 parent
ffa5f341
Added check in validateRequired function
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1066 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
8 additions
and
4 deletions
presentation/lookAndFeel/knowledgeTree/js/misc.js
| ... | ... | @@ -5,7 +5,8 @@ function setActionAndSubmit(newAction) { |
| 5 | 5 | |
| 6 | 6 | function setActionAndSubmitAsGet(newAction) { |
| 7 | 7 | document.MainForm.action = newAction; |
| 8 | - document.MainForm.method = "GET"; | |
| 8 | + document.MainForm.method = 'GET'; | |
| 9 | + alert(document.MainForm.action); | |
| 9 | 10 | document.MainForm.submit(); |
| 10 | 11 | } |
| 11 | 12 | |
| ... | ... | @@ -25,11 +26,14 @@ function isEmailAddr(email) |
| 25 | 26 | |
| 26 | 27 | function validRequired(formField,fieldLabel) |
| 27 | 28 | { |
| 28 | - var result = true; | |
| 29 | - | |
| 29 | + var result = true; | |
| 30 | 30 | if (formField.value.length == 0) |
| 31 | 31 | { |
| 32 | - alert('Please enter a value for the "' + fieldLabel +'" field.'); | |
| 32 | + if (fieldLabel == "selected") { | |
| 33 | + alert('Please enter a value for the ' + fieldLabel +' field.'); | |
| 34 | + } else { | |
| 35 | + alert('Please enter a value for the "' + fieldLabel +'" field.'); | |
| 36 | + } | |
| 33 | 37 | formField.focus(); |
| 34 | 38 | result = false; |
| 35 | 39 | } | ... | ... |