| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Dynamic menu in IE | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Afternoon all,
I have implemented a new vertical dropdown menu for our main navigation panel, which is quick and easily maintainable, and will glady share if I get this problem fixed!! It works like a dream in Netsacpe and Firefox but despite testing it in IE, once I have got all the code into the store templates I get a javascript error in IE. Line: 122 Char: 21 Error: Invalid argument Code: 0 Now, first point of call was to look at the source code for the page determine what is on line 122 and fix! On first look the line 122 contained some javascript from the call in rectangle_top.tpl regarding - function substitute(lbl) { Now I have commented out all the javascript from rectangle_top.tpl hoping to corner the error and fix, but despite removing this I still get the same javascript error in IE, same line number etc, except this time because the xcart javascript has been removed, line 122 now contains just some simple HTML code. So how can I identify where this error is coming from? I can;t work out from the IE popup containing the error message where the problem is. Any javascript gurus out there that can point me in the right direction?? Thanks in advance |
|||||||
#2
|
|||||||
|
|||||||
![]() You may not be looking at the correct line 122...post a url and someone can have a look.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
![]() http://www.lasertechgroup.com/12ls06dev/product.php?productid=35677
It can;t be line 122 of the source code of this page if you view source and identify line 122 (which at the moment is the javascript from rectangle_top.tpl). Even if I remove this it still returns the error at line 122. I just don;t know where to look for it, amd baffled! Thanks, |
|||||||
#4
|
|||||||
|
|||||||
![]() Did you put {literal} tags around your menu code? The two may be clashing:
{literal} menu code here {/literal}
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||
|
|||||||
![]() I thought {literal} tags were only really used within javascript?
I only have a call to the js file in the <head>. The menu itself sits in <table width="623" border="0" cellpadding="0" cellspacing="0" id="menu1" class="ddmx"> and then each section is held within a cell <a class="item1" href="home.php?cat=6161"><img src="{$ImagesDir}/nav/op2off.gif" width="97" height="46" border="0" alt="Paper Supplies" onmouseover="this.src='{$ImagesDir}/nav/op2on.gif'" onmouseout="this.src='{$ImagesDir}/nav/op2off.gif'" /></a> <div class="section"> <a class="item2 arrow" href="home.php?cat=6639">A4 Paper<img src="{$ImagesDir}/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="home.php?cat=6191">Paper A4 80gsm</a> <a class="item2" href="home.php?cat=6193">Paper A4 90gsm</a> <a class="item2" href="home.php?cat=6194">Paper A4 100gsm</a> <a class="item2" href="home.php?cat=6195">Paper A4 110gsm</a> <a class="item2" href="home.php?cat=6196">Paper A4 120gsm</a> <a class="item2" href="home.php?cat=6667">Other</a> </div> <a class="item2 arrow" href="home.php?cat=6640">A3 Paper<img src="{$ImagesDir}/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="home.php?cat=6192">Paper A3 80gsm</a> <a class="item2" href="home.php?cat=6669">Other</a> </div> </div> I have tried your suggestion around the above code with no success. I am going to remove sections of the site one by one and try to pinpoint the area that is producing that error. Thanks |
|||||||
#6
|
|||||||
|
|||||||
![]() DOH!
Of course there is a javascript call, I'd just hidden it at the bottom of head.tpl <script type="text/javascript"> var ddmx = new DropDownMenuX('menu1'); ddmx.delay.show = 0; ddmx.delay.hide = 400; ddmx.position.levelX.left = 2; ddmx.init(); </script> However I have put literal tags in to no effect, do they go outside or inside the script tag? |
|||||||
#7
|
|||||||
|
|||||||
![]() it goes outside
anything that has braces {} that has nothing to do with smarty should be wrapped in {literal}{/literal} tags |
|||||||
#8
|
|||||||
|
|||||||
![]() Thanks for your input guys.
I have found the source of the problem, nothing to do with the literal tags (although I have now put them in ![]() In rectangle_top.tpl i have the call to the js and the start of a table - <table border="0" cellpadding="0" cellspacing="0" width="{$width|default:"100%"}" height="100%"> <tr> <td valign="top"><div style="position: absolute;" id="div_null"></div> If I remove the above code, the menu works in IE. At first I thought it was the div id call, but even if I just remove the <div></div> I still get that js error, if I remove the start os this table, row and cell, the error disappears! Now b4 I get too elated, can anyone tell me what this id=div_null does? Thanks |
|||||||
#9
|
|||||||||
|
|||||||||
![]() OK, I'm having the same problem with DropDownMenuX.js and the same basic error code (line 122...).
The problem happens in product view with the javascript in product options. the price does not update for variants. The menu works ok, but the product_options mod crashes. if I remove the javascript file call in the header to DropDownMenuX.js, then the menu stops working (obviously) and the variants update like they are supposed to. Lee, How did you get this working (the table tags above are not part of the problem)?
__________________
jonc X-Cart Gold 4.1.10 - http://www.hypnoskates.com X-Cart Gold 4.1.10 - http://tryten.com/shop/ X-Cart Gold 4.1.10 - http://www.bluecurl.ca/shop/ |
|||||||||
#10
|
|||||||||
|
|||||||||
![]() It is a problem with the array object clashing between the menu and Product_Options module. to see the solution and download a patch go here:
http://forum.x-cart.com/showthread.php?t=34052
__________________
jonc X-Cart Gold 4.1.10 - http://www.hypnoskates.com X-Cart Gold 4.1.10 - http://tryten.com/shop/ X-Cart Gold 4.1.10 - http://www.bluecurl.ca/shop/ |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|