From 28a9cb7f4bbf0b5876a66e91525ff2ad93af099c Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 19 Dec 2010 16:23:19 -0500 Subject: Add and use rowhelper_onAdd which will fire javascript code after adding new row --- usr/local/www/installer/installer.php | 1 + usr/local/www/javascript/row_helper_dynamic.js | 3 +++ 2 files changed, 4 insertions(+) (limited to 'usr') diff --git a/usr/local/www/installer/installer.php b/usr/local/www/installer/installer.php index dae33f6..dbef003 100644 --- a/usr/local/www/installer/installer.php +++ b/usr/local/www/installer/installer.php @@ -763,6 +763,7 @@ function installer_custom() { totalrows = 1; loaded = 1; rowhelper_onChange = " onChange='javascript:row_helper_dynamic_custom()' "; + rowhelper_onAdd = 'row_helper_dynamic_custom();';
diff --git a/usr/local/www/javascript/row_helper_dynamic.js b/usr/local/www/javascript/row_helper_dynamic.js index 38ced4b..8b359ec 100755 --- a/usr/local/www/javascript/row_helper_dynamic.js +++ b/usr/local/www/javascript/row_helper_dynamic.js @@ -4,6 +4,7 @@ var rowtype = new Array(99); var newrow = new Array(99); var rowsize = new Array(99); var rowhelper_onChange = ''; +var rowhelper_onAdd = ''; for (i = 0; i < 99; i++) { rowname[i] = ''; @@ -50,6 +51,8 @@ var addRowTo = (function() { td.innerHTML = ''; tr.appendChild(td); tbody.appendChild(tr); + if(rowhelper_onAdd != '') + eval(rowhelper_onAdd); }); })(); -- cgit v1.1