tags:

views:

30

answers:

2

I use the load plugin of jquery in my webapplication.

Here is my piece of code:

$.post("/ecommerceV2/"+langcode+"/ecommerce/sortPromo",{promotypeid: $(v).val()},function(response){
  if (response.same == 'yes'){
   $('#infoLegende').show();
   $('#infoLegende').html('no' + $('#legende'+$(v).val()).html());
  }else{
   $('#infoLegende').hide();
   $('#legende'+$(v).val()).addClass('legendeBackground');
   $('#legende'+$(v).val()).removeClass('legendeTest');
   $('.assortiment').fadeOut('slow');
    $('.assortiment').load("/ecommerceV2/"+langcode+"/ecommerce/volledigAssortiment .assortiment",{assortiments: response.assortiments},function(){ $('.assortiment').fadeIn('slow');
  }
 },"json");

.assortiment is a table. This piece of code works fine in ie8, firefox, chrome, ... only the ie8 compatability mode won't show the results in my table.

Can somebody help me with this?

Update:

<div id="lijst">
    <div id='assortimentHeader'></div>
<table summary='assortiment' class='assortiment' width=805 id='assortiment' cellspacing=0>
<tr id='headerAssortiment' >
<th width=20 style='text-align: center;'>Code</th>
<th width=200 style='text-align: center;'>Omschrijving</th>
<th width=40 style='text-align: right;'>Prijs</th>
<th width=40 style='text-align: right;'>Adv.prijs</th>
<th width=35 style='text-align: right;'>Marge</th>
<th width=20 style='text-align: center;'>Bestel</th>
<th width=6 style='text-align: center;'>B1</th>
<th width=6 style='text-align: center;'>B2</th>
<th width=6 style='text-align: center;'>B3</th>
</tr>
<tr class='artikelgroep'><td colspan='9'><img alt='add' src='/ecommerceV2/assets/images/icons/add%202.png' style='float:left;' /><b>CHAMPIGNONS</b></td></tr>
<tr align='center' class="artikelRijDonkerPromo1">
<td width=20>5905</td>
<td width=200 class='omschrijving' style='cursor: pointer; text-align: left;'>CHAMP. (12X250GR)DEKSEL<img alt='foto' src='/ecommerceV2/assets/images/camera.png' style='float: right;' width='25' height='17' /><input type='hidden' class='artikel' value='5905' /></td>
<td width=40 style='text-align: right;'>&euro; 0.73</td>
<td width=40 style='text-align: right;'>&euro; 1.19</td>
<td style='margin-left: 20px; text-align: right;' width=35>34.97%</td>
<td width=20><input type='text' style='text-align: right; border: 1px #d9d9d9 solid;' size=5 class='aantal' name='aantal[5905]' /><input type='hidden' class='artikel' value='5905' /></td>
<td width=6>1</td>
<td width=6></td>
<td width=6>1</td>
</tr>
</table>
</div>
A: 

Any errors you can show us?

To start with, your missing a closing bracket for your .load function perhaps? I changed your code and laid it out how I do, easier to see brackets, etc (I find). Here is what I ended up with, brackets now match. Although if this was the issue I am surprised it worked in any browser.

$.post("/ecommerceV2/"+langcode+"/ecommerce/sortPromo",{promotypeid: $(v).val()},function(response)
{
    if (response.same == 'yes')
    {
        $('#infoLegende').show();
        $('#infoLegende').html('no' + $('#legende'+$(v).val()).html());
    }
    else
    {
        $('#infoLegende').hide();
        $('#legende'+$(v).val()).addClass('legendeBackground');
        $('#legende'+$(v).val()).removeClass('legendeTest');
        $('.assortiment').fadeOut('slow');
        $('.assortiment').load("/ecommerceV2/"+langcode+"/ecommerce/volledigAssortiment .assortiment", {assortiments: response.assortiments} , function()
        { 
            $('.assortiment').fadeIn('slow');
        });
    }
} ,"json");
jakenoble
thanks for your answer jakenoble but that was a typo. Your code is exactly the same as mine and it still doesn't do anything in ie7.
Jurgen Vandw
Can you show us the error Jurgen Vandw?
jakenoble
that's the problem. I get no error. :s In firefox, chrome, ie8, ... i get my table, in ie7 my table won't show up. I've downloaded debugbar for ie and checked what js returned and it returns my result but it don't shows up in the table. Probably a css error but I've runned a validator on it and it gave me no errors.
Jurgen Vandw
Do you have a public URL with the issue?
jakenoble
No I have not. And I can't make it public cause it is for my work. :sBut I can paste some code of how my table is generated.
Jurgen Vandw
In my question you can see my table
Jurgen Vandw
Have you tried inspecting this code while it is running using Firebug? Or the equivalent IE8 (while in compatibility mode) Developer Tools.
Jakub
My developer tools in ie8 crashed and I can't open it anymore. :( Firebug showed me no errors and gave me back te correct results but does not load it in my table in ie7. I'm pretty stuck
Jurgen Vandw
Found the problem. It seemed that you can't fill up a table class with load in ie7. I put the load on the lijst div and everything works in ie7. Stupid ie7. :@
Jurgen Vandw
A: 

Although I recommend fixing the code, a work around would be to make sure the page doesn't render in IE8 compatibility mode by default. You can do this in the head of your webpage:

<head><meta http-equiv="X-UA-Compatible" content="IE=8" /></head> 
WeekendWarrior
Thanks I have done that now, but that does not solve my problem in ie 7
Jurgen Vandw