You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by si...@apache.org on 2007/04/25 19:14:15 UTC

svn commit: r532409 - /ofbiz/trunk/framework/images/webapp/images/selectall.js

Author: sichen
Date: Wed Apr 25 10:14:12 2007
New Revision: 532409

URL: http://svn.apache.org/viewvc?view=rev&rev=532409
Log:
Reverting changes made to the javascript function that disables form buttons.  Fixes bug where submit buttons broke for IE and other browsers.  Please be careful when making changes to these functions and test across browsers.

Modified:
    ofbiz/trunk/framework/images/webapp/images/selectall.js

Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/selectall.js?view=diff&rev=532409&r1=532408&r2=532409
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/selectall.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/selectall.js Wed Apr 25 10:14:12 2007
@@ -202,9 +202,8 @@
     if (button.form.action != null && button.form.action.length > 0) {
         button.disabled = true;
     }
-    button.className = button.className + " disabled";
-    button.value = button.value + "*";
-}                                                                                                                                                                                                                          
+    button.form.submit();
+}
 
 function submitFormEnableButtonByName(formName, buttonName) {
     // alert("formName=" + formName + " buttonName=" + buttonName);



Re: svn commit: r532409 - /ofbiz/trunk/framework/images/webapp/images/selectall.js

Posted by Jonathon -- Improov <jo...@improov.com>.
David, Si Chen,

The change is correct; the reverted code is incorrect.

The line "button.form.submit" forces a form submit. The correct behavior is to defer that decision 
(to submit or not to) to the javascript action's return value: true means to submit, and false 
means not to submit.

Typical javascript action: onclick="disableButton(); return checkInputs();"

Jonathon

David E. Jones wrote:
> 
> This WAS tested in IE6. Which version of IE, and which other browsers 
> was in broken in, and in what way was it broken?
> 
> I agree with being careful about testing in various browsers and such, 
> but I also think it's important not to kill functionality without 
> looking into things first and being more detailed about the problem, and 
> finding a solution to it.
> 
> This change was made about 3 weeks ago if I remember right. How is it 
> just coming up now?
> 
> -David
> 
> 
> On Apr 25, 2007, at 11:14 AM, sichen@apache.org wrote:
> 
>> Author: sichen
>> Date: Wed Apr 25 10:14:12 2007
>> New Revision: 532409
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=532409
>> Log:
>> Reverting changes made to the javascript function that disables form 
>> buttons.  Fixes bug where submit buttons broke for IE and other 
>> browsers.  Please be careful when making changes to these functions 
>> and test across browsers.
>>
>> Modified:
>>     ofbiz/trunk/framework/images/webapp/images/selectall.js
>>
>> Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js
>> URL: 
>> http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/selectall.js?view=diff&rev=532409&r1=532408&r2=532409 
>>
>> ============================================================================== 
>>
>> --- ofbiz/trunk/framework/images/webapp/images/selectall.js (original)
>> +++ ofbiz/trunk/framework/images/webapp/images/selectall.js Wed Apr 25 
>> 10:14:12 2007
>> @@ -202,9 +202,8 @@
>>      if (button.form.action != null && button.form.action.length > 0) {
>>          button.disabled = true;
>>      }
>> -    button.className = button.className + " disabled";
>> -    button.value = button.value + "*";
>> -}
>> +    button.form.submit();
>> +}
>>
>>  function submitFormEnableButtonByName(formName, buttonName) {
>>      // alert("formName=" + formName + " buttonName=" + buttonName);
>>
>>
> 


Re: svn commit: r532409 - /ofbiz/trunk/framework/images/webapp/images/selectall.js

Posted by "David E. Jones" <jo...@undersunconsulting.com>.
This WAS tested in IE6. Which version of IE, and which other browsers  
was in broken in, and in what way was it broken?

I agree with being careful about testing in various browsers and  
such, but I also think it's important not to kill functionality  
without looking into things first and being more detailed about the  
problem, and finding a solution to it.

This change was made about 3 weeks ago if I remember right. How is it  
just coming up now?

-David


On Apr 25, 2007, at 11:14 AM, sichen@apache.org wrote:

> Author: sichen
> Date: Wed Apr 25 10:14:12 2007
> New Revision: 532409
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=532409
> Log:
> Reverting changes made to the javascript function that disables  
> form buttons.  Fixes bug where submit buttons broke for IE and  
> other browsers.  Please be careful when making changes to these  
> functions and test across browsers.
>
> Modified:
>     ofbiz/trunk/framework/images/webapp/images/selectall.js
>
> Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/ 
> webapp/images/selectall.js?view=diff&rev=532409&r1=532408&r2=532409
> ====================================================================== 
> ========
> --- ofbiz/trunk/framework/images/webapp/images/selectall.js (original)
> +++ ofbiz/trunk/framework/images/webapp/images/selectall.js Wed Apr  
> 25 10:14:12 2007
> @@ -202,9 +202,8 @@
>      if (button.form.action != null && button.form.action.length >  
> 0) {
>          button.disabled = true;
>      }
> -    button.className = button.className + " disabled";
> -    button.value = button.value + "*";
> -}
> +    button.form.submit();
> +}
>
>  function submitFormEnableButtonByName(formName, buttonName) {
>      // alert("formName=" + formName + " buttonName=" + buttonName);
>
>


Re: svn commit: r532409 - /ofbiz/trunk/framework/images/webapp/images/selectall.js

Posted by "David E. Jones" <jo...@undersunconsulting.com>.
This WAS tested in IE6. Which version of IE, and which other browsers  
was in broken in, and in what way was it broken?

I agree with being careful about testing in various browsers and  
such, but I also think it's important not to kill functionality  
without looking into things first and being more detailed about the  
problem, and finding a solution to it.

This change was made about 3 weeks ago if I remember right. How is it  
just coming up now?

-David


On Apr 25, 2007, at 11:14 AM, sichen@apache.org wrote:

> Author: sichen
> Date: Wed Apr 25 10:14:12 2007
> New Revision: 532409
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=532409
> Log:
> Reverting changes made to the javascript function that disables  
> form buttons.  Fixes bug where submit buttons broke for IE and  
> other browsers.  Please be careful when making changes to these  
> functions and test across browsers.
>
> Modified:
>     ofbiz/trunk/framework/images/webapp/images/selectall.js
>
> Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/ 
> webapp/images/selectall.js?view=diff&rev=532409&r1=532408&r2=532409
> ====================================================================== 
> ========
> --- ofbiz/trunk/framework/images/webapp/images/selectall.js (original)
> +++ ofbiz/trunk/framework/images/webapp/images/selectall.js Wed Apr  
> 25 10:14:12 2007
> @@ -202,9 +202,8 @@
>      if (button.form.action != null && button.form.action.length >  
> 0) {
>          button.disabled = true;
>      }
> -    button.className = button.className + " disabled";
> -    button.value = button.value + "*";
> -}
> +    button.form.submit();
> +}
>
>  function submitFormEnableButtonByName(formName, buttonName) {
>      // alert("formName=" + formName + " buttonName=" + buttonName);
>
>