$('#div').load('/controller/_partialview);
<div id="div">"partial view"</div>

does not work (does not load the partial view) in IE9
It works perfrectly on firefox and chrome

What is the solution?
thanks in advance

Whats the code for the _partialview page? That will be better to look at than a 2 line code that no one can help you with.

Member Avatar for stbuchok

From the code I'm looking at IE9 is the only one doing it right. You haven't closed the single quote for the location of the file.

As pointed by stbuchok, your syntax is invalid. It should be:

$('#div').load('/controller/_partialview');

quote is a mistake happened when copying code. Sorry for that

this is my partialview

<div class="body_txt width_640" style="margin-top: 20px; display: inline-block; float: left;">
        <br>
        <table style=" width:640px; border:0;"  cellspacing="0" cellpadding="0" class="table_shop01 body_txt">

            <tbody>
                <tr>
                    <th style=" width:60%; text-align: left;">Selected Items</th>
                    <th style=" width:40%; text-align: left; border-right:2px solid #759C12;">Unit Price</th>
                 </tr>



                @foreach (var item in Model.ListOfProducts)
                {
                    string k = @item.PriceListItemID.ToString();
                    <tr>
                        <td style="text-align: left; border-left:1px solid #759C12;">@item.ProductName</td>

                        <td style="text-align: left;">@item.Price.ToString() @item.CurrencySymbol</td>

                        <td style="text-align:left;">@item.TotalPrice @item.CurrencySymbol</td>*@
                        <td style="text-align: left; border-bottom:0;border-right:0;border-top:0; width:auto;">
                        <button type="button" class="btn_delete_2" id="@k" name="RemoveID" value="@item.PriceListItemID" style="display:none;"></button>

                        </td>
                    </tr>
                }
            </tbody>

            <tfoot>
                <tr>
                    <th id="total" colspan="1" style="text-align:left; border-right:2px;">Grand Total </th>
                    <td>@Model.GrandPrice.ToString()</td>
                </tr>
            </tfoot>
        </table>

</div>

here s how i am calling the partial view ..

 <div id="PartialView"></div>


   $(document).ready(function() {
        $('#PartialView').load('/contoller/_PartialView') ;

    });

Thank you.
Appreciate your kindly help.

p.s - this works fine in firefox and chrome only IE give the problem.

Member Avatar for stbuchok

So what is the error that IE is throwing? On what line is the error happening? What does the HTML look like when it is rendered?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.