[Pieforms-commit] SF.net SVN: pieforms: [265] pieforms-php5/trunk/src/static/core/pieforms.js
Status: Alpha
Brought to you by:
oracleshinoda
From: <ora...@us...> - 2007-12-31 12:15:21
|
Revision: 265 http://pieforms.svn.sourceforge.net/pieforms/?rev=265&view=rev Author: oracleshinoda Date: 2007-12-31 04:15:25 -0800 (Mon, 31 Dec 2007) Log Message: ----------- Only wire up the submit buttons if they're actually present. They might not be if the application has defined the replaceHTML for the form to be something else that doesn't have the buttons in it. Modified Paths: -------------- pieforms-php5/trunk/src/static/core/pieforms.js Modified: pieforms-php5/trunk/src/static/core/pieforms.js =================================================================== --- pieforms-php5/trunk/src/static/core/pieforms.js 2007-12-31 12:14:53 UTC (rev 264) +++ pieforms-php5/trunk/src/static/core/pieforms.js 2007-12-31 12:15:25 UTC (rev 265) @@ -139,7 +139,10 @@ this.connectSubmitButtons = function() { forEach(self.data.submitButtons, function(buttonName) { - connect(self.data.name + '_' + buttonName, 'onclick', function() { self.clickedButton = this; }); + var btn = $(self.data.name + '_' + buttonName); + if (btn) { + connect(btn, 'onclick', function() { self.clickedButton = this; }); + } }); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |