diff --git a/js/tbl_change.js b/js/tbl_change.js index c7bee73e8433..97c9bf7663c3 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -9,8 +9,9 @@ * Modify from controls when the "NULL" checkbox is selected * * @param string the MySQL field type - * @param string the urlencoded field name + * @param string the urlencoded field name - OBSOLETE * @param string the md5 hashed field name + * @param string the multi_edit row sequence number * * @return boolean always true */ @@ -18,8 +19,8 @@ function nullify(theType, urlField, md5Field, multi_edit) { var rowForm = document.forms['insertForm']; - if (typeof(rowForm.elements['funcs' + multi_edit + '[' + urlField + ']']) != 'undefined') { - rowForm.elements['funcs' + multi_edit + '[' + urlField + ']'].selectedIndex = -1; + if (typeof(rowForm.elements['funcs' + multi_edit + '[' + md5Field + ']']) != 'undefined') { + rowForm.elements['funcs' + multi_edit + '[' + md5Field + ']'].selectedIndex = -1; } // "SET" field , "ENUM" field with more than 20 characters @@ -47,7 +48,7 @@ function nullify(theType, urlField, md5Field, multi_edit) } // Other field types else /*if (theType == 5)*/ { - rowForm.elements['fields' + multi_edit + '[' + urlField + ']'].value = ''; + rowForm.elements['fields' + multi_edit + '[' + md5Field + ']'].value = ''; } // end if... else if... else return true; @@ -59,6 +60,7 @@ function nullify(theType, urlField, md5Field, multi_edit) * entered * * @param string the urlencoded field name + * @param string the multi_edit row sequence number * * @return boolean always true */