views:

221

answers:

4

I wrote an application using ASP.NET MVC, in this application I have an Index view which renders multiple partial views. The application works fine in both IE and Google chrome but does not seem to work in Firefox. Does Firefox have any issues when rendering partial views or is there something extra that I have to add to my code? This is my code:

<div id="tabs">
    <ul class = "ui-tabs-nav">
     <li><a href="#tabs-1">Some stuff 1</a></li>
     <li><a href="#tabs-2">Some stuff 2</a></li>
     <li><a href="#tabs-3">Some stuff 3</a></li>
    </ul>

    <div id="tabs-1">
      <% Html.RenderPartial("PartialView1"); %>
  </div>

  <div id="tabs-2">
    <% Html.RenderPartial("PartialView2"); %>  
  </div>

  <div id="tabs-3">
    <% Html.RenderPartial("PartialView3"); %>         
  </div>

</div>
+4  A: 

A partial view is not 'rendered' by the browser at all. It's stuffed into the output stream of the server at the right point as the page is generated.

Most likely you have some malformed HTML (elements crossed or not closed), and so you're seeing different things on different browsers.

Update: I can't, at a glance, see anything wrong with that sample you've just added, but you need to look at the source for the whole page (at the browser), not just a fragment.

Will Dean
A: 

Could be some issue with jQuery-ui css file or the javascript-file not being properly referenced. Maybe you can post that code as well ?

Morph
A: 

Check your HTML may be you wrote the script tag like this

<script type="text/javascript" />

it should always be written like this:

<script type="text/javascript"></script>
Marwan Aouida
yep that's how I declared the script tags
Draco
A: 

Ha, I finally solved it! Silly me set the script type to jscript instead of javascript:

<script type ="text/jscript">

instead of

<script type ="text/javascript">
Draco