Fixed bug #450255 (new javascript error with netscape3) thanks to Fran�ois
This commit is contained in:
@@ -35,6 +35,8 @@ $Source$
|
||||
* lib.inc.php3, lines 196-200; config.inc.php3, line 40;
|
||||
Documentation.html, lines 352-357: merged patch #452877
|
||||
($cfgServer['only_db'] - array) from Jakub Wilk.
|
||||
* functions.js: fixed bug #450255 (new javascript error with netscape3)
|
||||
thanks to Fran<61>ois <outils@altern.org>.
|
||||
|
||||
2001-08-18 Robin Johnson <robbat2@orbis-terrarum.net>
|
||||
* lib.inc.php3 (788, 790) : tweak size for lower resolution screens.
|
||||
|
@@ -26,9 +26,10 @@ function emptySqlQuery(theForm)
|
||||
}
|
||||
// js1.2+ -> validation with regular expressions
|
||||
else {
|
||||
var isEmpty = (sqlQuery1.value.replace(/\s/g, '') == '') ? 1 : 0;
|
||||
var space_re = new RegExp('\\s+');
|
||||
var isEmpty = (sqlQuery1.value.replace(space_re, '') == '') ? 1 : 0;
|
||||
if (isEmpty && typeof(theForm.elements['sql_file']) != 'undefined') {
|
||||
isEmpty = (theForm.elements['sql_file'].value.replace(/\s/g, '') == '') ? 1 : 0;
|
||||
isEmpty = (theForm.elements['sql_file'].value.replace(space_re, '') == '') ? 1 : 0;
|
||||
}
|
||||
if (isEmpty && typeof(theForm.elements['id_bookmark']) != 'undefined') {
|
||||
isEmpty = (theForm.elements['id_bookmark'].value == '') ? 1 : 0;
|
||||
@@ -67,7 +68,8 @@ function emptyFormElements(theForm, theFieldName)
|
||||
if (!isRegExp) {
|
||||
var isEmpty = (theField.value == '') ? 1 : 0;
|
||||
} else {
|
||||
var isEmpty = (theField.value.replace(/\s/g, '') == '') ? 1 : 0;
|
||||
var space_re = new RegExp('\\s+');
|
||||
var isEmpty = (theField.value.replace(space_re, '') == '') ? 1 : 0;
|
||||
}
|
||||
if (isEmpty) {
|
||||
theForm.reset();
|
||||
|
Reference in New Issue
Block a user