hi, I have collected some common reasons which causes JS to crash in IE7. http://groups.google.com/group/jquery-en/browse_thread/thread/f1eab9b59e923fca/40b64f80117f62f2#40b64f80117f62f2
Generally, I try to make sure my JS is working fine in FF and once everything is working fine, I test in FF and check for any mistake (reported in my blog). I would say 95% of the time, these are the five mistake that make my JS to break in IE Regards, bingo On Dec 21, 1:25 pm, Shawn <[EMAIL PROTECTED]> wrote: > When I run into these "works in FF but not IE" issues, I plop my code > into jslint (http://www.jslint.com/). Reading through the warnings and > errors it found does two things for me > - first it helps me identify problem areas. IE is notorious for > throwing errors on extra commas - FF ignores them - i.e. { a : "a", } > would cause an error in IE. jslint notes these. > - secondly it makes my code better overall. I caused me to question > some of the long standing "habits" I had and revise my coding style > appropriately. > > HTH. > > Shawn > > > > Alexandre Plennevaux wrote: > > hello friends, > > > my application is running ok in firefox but is not doing so great in > > internet explorer. I'm having a hard time tracking down the bug(s). > > Can someone help me? Problem is i didn't find any decent tool to debug > > javascrpt in internet explorer. > > > Anyway, here is the prototype i'm working on: > > >http://www.pixeline.be/test/m2/ > > > the source code is here: > >http://www.pixeline.be/test/m2/_js/frontend/6_proto_strata+datascape+... > > > Basically, a good part of the code is used to make sure all elements > > fits nicely graphically on the background 4px grid, whatever the > > screen resolution. > > The top menu is "strataGrid" and after clicking on the second line of > > options in the menu, you get to the "datascape". > > > now, i'm not an expert in javascript so any coding improvement you can > > suggest is welcomed, i did it my way :) > > > The issue comes with the apparition of the datascape. It chokes and > > does not finish appearing. In firefox 2 it works well though. > > > I think the error is somewhere here: > > > $('.strataTrigger').bind('click', function(){ > > var $thisMenu = $(this).parents('.mainmenu'); > > var li = $(this).parent(); > > var index = li.parent().children('li').index(li[0]); > > $newLeft = strataGrid.startX + (strataGrid.colCenter - (index > > + 1)) * strataGrid.colWidth; > > $('.strataTrigger', $thisMenu).removeClass('selected'); > > $(this).addClass('selected'); > > $thisMenu.animate({ > > left: $newLeft + 'px' > > }); > > // 4._ SHOW/HIDES MENUS > > if ($thisMenu.attr('id') == 'strata1') { > > var showme = $(this).metadata().showme; > > //remove datascape if displayed > > if ($('#datascape').length) { > > $('#datascape').unbind().fadeOut("slow", function(){ > > clearInterval(datascape.$interval); > > $(this).hide(); // HIDE OR REMOVE ?? _ A SURVEILLER > > }); > > } > > > $('.strata2').each(function(){ > > if ($(this).hasClass(showme)) { > > $(this).show(); > > } > > else { > > $(this).hide(); > > } > > }); > > } > > else > > if ($thisMenu.hasClass('strata2')) { > > $('#strata3').html(''); > > $("#datascape").load('ajax_datascape.inc.html', function(){ > > $(this).fadeIn("slow"); > > drawDatascape(strataGrid, ''); > > }); > > } > > return false; > > });- Hide quoted text - > > - Show quoted text -