You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2008/04/10 11:22:35 UTC

svn commit: r646710 - /ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl

Author: lektran
Date: Thu Apr 10 02:22:31 2008
New Revision: 646710

URL: http://svn.apache.org/viewvc?rev=646710&view=rev
Log:
Fixed some buggy javascript

Modified:
    ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl

Modified: ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl?rev=646710&r1=646709&r2=646710&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl (original)
+++ ofbiz/trunk/applications/ecommerce/webapp/ecommerce/customer/newcustomer.ftl Thu Apr 10 02:22:31 2008
@@ -48,14 +48,12 @@
              // document.forms["newuserform"].elements["USERNAME"].disabled=false;
          }
      }
-     alert(document.getElementById("customerCountry").value);
-        if ( document.getElementById("customerCountry").value == "USA"
-             || document.getElementById("customerCountry").value == "UMI" ) {
-            document.getElementById("customerState").style.display = "block";
-        }
-        else {
-            document.getElementById("customerState").style.display = "none";
-        }
+     function hideShowUsaStates() {
+         if (document.getElementById("customerCountry").value == "USA" || document.getElementById("customerCountry").value == "UMI") {
+             document.getElementById("customerState").style.display = "block";
+         } else {
+             document.getElementById("customerState").style.display = "none";
+         }
      }
 </script>
 </#if>
@@ -170,7 +168,7 @@
             <div class="form-label">${uiLabelMap.PartyCountry}</div>
             <div class="form-field">
                 <@fieldErrors fieldName="CUSTOMER_COUNTRY"/>
-                <select name="CUSTOMER_COUNTRY" class='selectBox' onClick="javascript:hideShowUsaStates()" id="customerCountry">
+                <select name="CUSTOMER_COUNTRY" class='selectBox' onClick="hideShowUsaStates();" id="customerCountry">
                     <#if requestParameters.CUSTOMER_COUNTRY?exists><option value='${requestParameters.CUSTOMER_COUNTRY}'>${selectedCountryName?default(requestParameters.CUSTOMER_COUNTRY)}</option></#if>
                     ${screens.render("component://common/widget/CommonScreens.xml#countries")}
                 </select> *