From 2bd4e256733e336d62a1a435598852403bc28093 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Sat, 23 May 2009 12:29:54 +0000 Subject: [PATCH] Fixed bug #2795256, introduced by patch #2602633 --- js/tbl_change.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/tbl_change.js b/js/tbl_change.js index c7bee73e8..97c9bf766 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 */