svn commit: r652312 - /ofbiz/branches/release4.0/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r652312 - /ofbiz/branches/release4.0/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl

lektran
Author: lektran
Date: Wed Apr 30 00:09:01 2008
New Revision: 652312

URL: http://svn.apache.org/viewvc?rev=652312&view=rev
Log:
Fix for javascript error in IE, OFBIZ-1751, pulled from trunk

Modified:
    ofbiz/branches/release4.0/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl

Modified: ofbiz/branches/release4.0/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/release4.0/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl?rev=652312&r1=652311&r2=652312&view=diff
==============================================================================
--- ofbiz/branches/release4.0/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl (original)
+++ ofbiz/branches/release4.0/applications/order/webapp/ordermgr/entry/catalog/productdetail.ftl Wed Apr 30 00:09:01 2008
@@ -32,12 +32,20 @@
             document.addform.quantity.disabled = true;
             var elem = document.getElementById('product_id_display');
             var txt = document.createTextNode('');
-            elem.replaceChild(txt, elem.firstChild);
+            if(elem.hasChildNodes()) {
+                elem.replaceChild(txt, elem.firstChild);
+            } else {
+                elem.appendChild(txt);
+            }
         } else {
             document.addform.quantity.disabled = false;
             var elem = document.getElementById('product_id_display');
             var txt = document.createTextNode(name);
-            elem.replaceChild(txt, elem.firstChild);
+            if(elem.hasChildNodes()) {
+                elem.replaceChild(txt, elem.firstChild);
+            } else {
+                elem.appendChild(txt);
+            }
         }
     }
     function isVirtual(product) {