Fixed problems with Javascript and newlines

This commit is contained in:
wolfpac444 2003-04-22 23:09:46 +00:00
parent a118eeacfc
commit 43ae7c2259
8 changed files with 39 additions and 39 deletions

View file

@ -39,20 +39,20 @@
var _alertString="";
var alertString2;
if (f.categorycode.value.length==0) {
_alertString += "- categorycode missing\\n";
_alertString += "- categorycode missing\n";
}
// alert(window.document.Aform.description.value);
if (!(isNotNull(window.document.Aform.description,1))) {
_alertString += "- description missing\\n";
_alertString += "- description missing\n";
}
if (!isNum(f.upperagelimit,0)) {
_alertString += "- upperagelimit is not a number\\n";
_alertString += "- upperagelimit is not a number\n";
}
if (_alertString.length==0) {
document.Aform.submit();
} else {
alertString2 = "Form not submitted because of the following problem(s)\\n";
alertString2 += "------------------------------------------------------------------------------------\\n\\n";
alertString2 = "Form not submitted because of the following problem(s)\n";
alertString2 += "------------------------------------------------------------------------------------\n\n";
alertString2 += _alertString;
alert(alertString2);
}

View file

@ -39,20 +39,20 @@
var _alertString="";
var alertString2;
if (f.categorycode.value.length==0) {
_alertString += "- categorycode missing\\n";
_alertString += "- categorycode missing\n";
}
// alert(window.document.Aform.description.value);
if (!(isNotNull(window.document.Aform.description,1))) {
_alertString += "- description missing\\n";
_alertString += "- description missing\n";
}
if (!isNum(f.upperagelimit,0)) {
_alertString += "- upperagelimit is not a number\\n";
_alertString += "- upperagelimit is not a number\n";
}
if (_alertString.length==0) {
document.Aform.submit();
} else {
alertString2 = "Form not submitted because of the following problem(s)\\n";
alertString2 += "------------------------------------------------------------------------------------\\n\\n";
alertString2 = "Form not submitted because of the following problem(s)\n";
alertString2 += "------------------------------------------------------------------------------------\n\n";
alertString2 += _alertString;
}
}

View file

@ -38,22 +38,22 @@ function Check(f) {
var _alertString="";
var alertString2;
if (f.itemtype.value.length==0) {
_alertString += "- itemtype missing\\n";
_alertString += "- itemtype missing\n";
}
if (!(isNotNull(window.document.Aform.description,1))) {
_alertString += "- description missing\\n";
_alertString += "- description missing\n";
}
if ((!isNum(f.loanlength,0)) && f.loanlength.value.length > 0) {
_alertString += "- loan length is not a number\\n";
_alertString += "- loan length is not a number\n";
}
if ((!isNum(f.rentalcharge,0)) && f.rentalcharge.value.length > 0) {
_alertString += "- rental charge is not a number\\n";
_alertString += "- rental charge is not a number\n";
}
if (_alertString.length==0) {
document.Aform.submit();
} else {
alertString2 = "Form not submitted because of the following problem(s)\\n";
alertString2 += "------------------------------------------------------------------------------------\\n\\n";
alertString2 = "Form not submitted because of the following problem(s)\n";
alertString2 += "------------------------------------------------------------------------------------\n\n";
alertString2 += _alertString;
alert(alertString2);
}

View file

@ -38,13 +38,13 @@
var _alertString="";
var alertString2;
if (f.tagfield.value.length==0) {
_alertString += "- tag number missing\\n";
_alertString += "- tag number missing\n";
}
if (_alertString.length==0) {
document.Aform.submit();
} else {
alertString2 = "Form not submitted because of the following problem(s)\\n";
alertString2 += "------------------------------------------------------------------------------------\\n\\n";
alertString2 = "Form not submitted because of the following problem(s)\n";
alertString2 += "------------------------------------------------------------------------------------\n\n";
alertString2 += _alertString;
alert(alertString2);
}

View file

@ -39,16 +39,16 @@
var _alertString="";
var alertString2;
if (f.printername.value.length==0) {
_alertString += "- printer name missing\\n";
_alertString += "- printer name missing\n";
}
if (f.printqueue.value.length==0) {
_alertString += "- Queue missing\\n";
_alertString += "- Queue missing\n";
}
if (_alertString.length==0) {
document.Aform.submit();
} else {
alertString2 = "Form not submitted because of the following problem(s)\\n";
alertString2 += "------------------------------------------------------------------------------------\\n\\n";
alertString2 = "Form not submitted because of the following problem(s)\n";
alertString2 += "------------------------------------------------------------------------------------\n\n";
alertString2 += _alertString;
alert(alertString2);
}

View file

@ -39,13 +39,13 @@
var _alertString="";
var alertString2;
if (f.word.value.length==0) {
_alertString += "- word missing\\n";
_alertString += "- word missing\n";
}
if (_alertString.length==0) {
document.Aform.submit();
} else {
alertString2 = "Form not submitted because of the following problem(s)\\n";
alertString2 += "------------------------------------------------------------------------------------\\n\\n";
alertString2 = "Form not submitted because of the following problem(s)\n";
alertString2 += "------------------------------------------------------------------------------------\n\n";
alertString2 += _alertString;
alert(alertString2);
}

View file

@ -38,16 +38,16 @@
var _alertString="";
var alertString2;
if (f.variable.value.length==0) {
_alertString += "- variable missing\\n";
_alertString += "- variable missing\n";
}
if (f.value.value.length==0) {
_alertString += "- value missing\\n";
_alertString += "- value missing\n";
}
if (_alertString.length==0) {
document.Aform.submit();
} else {
alertString2 = "Form not submitted because of the following problem(s)\\n";
alertString2 += "------------------------------------------------------------------------------------\\n\\n";
alertString2 = "Form not submitted because of the following problem(s)\n";
alertString2 += "------------------------------------------------------------------------------------\n\n";
alertString2 += _alertString;
alert(alertString2);
}

View file

@ -39,31 +39,31 @@
var _alertString="";
var alertString2;
if (f.searchfield.value.length==0) {
_alertString += "- site name missing\\n";
_alertString += "- site name missing\n";
}
if (f.host.value.length==0) {
_alertString += "- host missing\\n";
_alertString += "- host missing\n";
}
if (f.port.value.length==0) {
_alertString += "- port missing\\n";
_alertString += "- port missing\n";
}
if (f.db.value.length==0) {
_alertString += "- database missing\\n";
_alertString += "- database missing\n";
}
if (isNaN(f.port.value)) {
_alertString += "- port must be a number\\n";
_alertString += "- port must be a number\n";
}
if (isNaN(f.rank.value)) {
_alertString += "- rank must be a number\\n";
_alertString += "- rank must be a number\n";
}
if (isNaN(f.checked.value) || f.checked.value<0 || f.checked.value>1) {
_alertString += "- checked must be 0 or 1\\n";
_alertString += "- checked must be 0 or 1\n";
}
if (_alertString.length==0) {
document.Aform.submit();
} else {
alertString2 = "Form not submitted because of the following problem(s)\\n";
alertString2 += "------------------------------------------------------------------------------------\\n\\n";
alertString2 = "Form not submitted because of the following problem(s)\n";
alertString2 += "------------------------------------------------------------------------------------\n\n";
alertString2 += _alertString;
alert(alertString2);
}