[Skip to main content](#vessel-content)

#   JavaScript Error - breaks CSS in IE

##

- **[acarlo1](/forum/user/12712-acarlo1 "View acarlo1's Profile")**
- [![acarlo1's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12712-acarlo1 "View acarlo1's Profile") Topic Author
- [ Offline](/forum/user/12712-acarlo1)

Less More

- Posts: 2
- Thank you received: 0
-
-

13 years 9 months ago [\#84463](#84463) by [acarlo1](/forum/user/12712-acarlo1 "View acarlo1's Profile")  *[JavaScript Error - breaks CSS in IE](/forum/3-bug-report/77269-javascript-error-breaks-css-in-ie#84463 "Hello,  First of all thank you for an awesome shopping cart! I have traced down a bug in the Content Module, a javascript syntax error, missing semicolon. Only IE seems to have a problem with it, but it breaks CSS in that case. If I disable the Content Module the syntax error no longer shows in the developer console and CSS loads properly.  I put the code into an online error checker and it says missing semicolon, but I honestly don't know where the semicolon should be.  Here is the function causing the error:")* was created by *[acarlo1](/forum/user/12712-acarlo1 "View acarlo1's Profile")*

Hello,

First of all thank you for an awesome shopping cart! I have traced down a bug in the Content Module, a javascript syntax error, missing semicolon. Only IE seems to have a problem with it, but it breaks CSS in that case. If I disable the Content Module the syntax error no longer shows in the developer console and CSS loads properly.

I put the code into an online error checker and it says missing semicolon, but I honestly don't know where the semicolon should be.

Here is the function causing the error:
Code:

function hikashopModifyQuantity(id,obj,add,form,type){var d=document,cart_type="cart",addStr="",qty=1,e=null;if(type)cart_type=type;if(add)addStr="&amp;add=1";if(obj){qty=parseInt(obj.value);}else if(document.getElementById("hikashop_product_quantity_field_"+id).value){qty=document.getElementById("hikashop_product_quantity_field_"+id).value;} if(form&amp;&amp;document[form]){var varform=document[form];if(cart_type=="wishlist"){e=d.getElementById("hikashop_cart_type_"+id);if(e)e.value="wishlist";f=d.getElementById("type");if(f)f.value="wishlist";}else{e=d.getElementById("hikashop_cart_type_"+id);if(e)e.value="cart";} if(varform.task){varform.task.value="updatecart";} varform.submit();}else{var url="/component/hikashop/product/updatecart/tmpl-component?from=module&amp;product_id="+id+"&amp;cart_type="+cart_type+"&amp;quantity="+qty+addStr+"&amp;return_url=L2NvbXBvbmVudC9oaWthc2hvcC9jaGVja291dA%3D%3D"; var completeFct=function(result){if(cart_type!="wishlist"){var hikaModule=window.document.getElementById("hikashop_cart_module");if(hikaModule)hikaModule.innerHTML=result;} window.location='/component/hikashop/checkout';} &gt;&gt; Error checker at http://www.javascriptlint.com/online_lint.php points to this location as missing semicolon try{new Ajax(url,{method:"get",onComplete:completeFct}).request();}catch(err){new Request({url:url,method:"get",onComplete:completeFct}).send();}} return false;}

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI2OS1qYXZhc2NyaXB0LWVycm9yLWJyZWFrcy1jc3MtaW4taWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 9 months ago [\#84471](#84471) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[JavaScript Error - breaks CSS in IE](/forum/3-bug-report/77269-javascript-error-breaks-css-in-ie#84471 "Hello,  First of all thank you for an awesome shopping cart! I have traced down a bug in the Content Module, a javascript syntax error, missing semicolon. Only IE seems to have a problem with it, but it breaks CSS in that case. If I disable the Content Module the syntax error no longer shows in the developer console and CSS loads properly.  I put the code into an online error checker and it says missing semicolon, but I honestly don't know where the semicolon should be.  Here is the function causing the error:")*

Hi,

Thanks for the report. I have patched the javascript. It would be include in the next HikaShop release.
You can edit the file "administrator/com_hikashop/helpers/cart.php" and add a semicolon for the two "var completeFct = function(result) { ... };".

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [acarlo1](/forum/user/12712-acarlo1 "View acarlo1's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI2OS1qYXZhc2NyaXB0LWVycm9yLWJyZWFrcy1jc3MtaW4taWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[acarlo1](/forum/user/12712-acarlo1 "View acarlo1's Profile")**
- [![acarlo1's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12712-acarlo1 "View acarlo1's Profile") Topic Author
- [ Offline](/forum/user/12712-acarlo1)

Less More

- Posts: 2
- Thank you received: 0
-
-

13 years 9 months ago [\#84596](#84596) by [acarlo1](/forum/user/12712-acarlo1 "View acarlo1's Profile")  Replied by *[acarlo1](/forum/user/12712-acarlo1 "View acarlo1's Profile")* on topic *[JavaScript Error - breaks CSS in IE](/forum/3-bug-report/77269-javascript-error-breaks-css-in-ie#84596 "Hello,  First of all thank you for an awesome shopping cart! I have traced down a bug in the Content Module, a javascript syntax error, missing semicolon. Only IE seems to have a problem with it, but it breaks CSS in that case. If I disable the Content Module the syntax error no longer shows in the developer console and CSS loads properly.  I put the code into an online error checker and it says missing semicolon, but I honestly don't know where the semicolon should be.  Here is the function causing the error:")*

Awesome, thanks Jerome! Very impressed with the quick response!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC83NzI2OS1qYXZhc2NyaXB0LWVycm9yLWJyZWFrcy1jc3MtaW4taWU/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.079 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
