Note that there are some explanatory texts on larger screens.

plurals
  1. POInternet Explorer does not expand table after ajax call
    primarykey
    data
    text
    <p>When I make a jquery ajax call to auto fill a dropdown on page load the dropdown control is cut off by the containing table. I understand that if set the table width to 100% it would fix this but in my case I cannot do that. This code works fine in FF. It's almost like IE won't "re-render" the page after the ajax call completes. Here's the code --</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;table border="1"&gt; &lt;tr&gt; &lt;td&gt; &lt;select&gt; &lt;option&gt;Test 1&lt;/option&gt; &lt;option&gt;Test 2&lt;/option&gt; &lt;option&gt;Test 3&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;select id="mySelect"&gt; &lt;/select&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;script type="text/javascript"&gt; var mySelect = $( "#mySelect" ); fillListCombo = function( json ) { if ( json ) { mySelect.empty(); $( json ).each( function( i, obj ) { var option = $( "&lt;option&gt;&lt;/option&gt;" ); option.val( obj.id ); option.text( obj.text ); option.appendTo( mySelect ); } ); } else { mySelect.find( 'option' ).remove().end().append( '&lt;option value="0"&gt;(none available)&lt;/option&gt;' ).val( '0' ); } } updateListCombo = function() { $.ajax( { type: "GET", url: "http://localhost/Ajax/ListLookupPage.aspx", dataType: "json", data: { listkindid: "1", userid: "17" }, timeout: 2000, success: function( opts ) { fillListCombo( opts ); }, error: function( xhr, status ) { mySelect.find( 'option' ).remove().end().append( '&lt;option value="0"&gt;(none selected)&lt;/option&gt;' ).val( '0' ); } } ); }; updateListCombo(); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I wish I had a public Ajax page I could provide so it could be copied and pasted in a text editor to try on your own, but I don't. </p> <p>How it appears in Firefox:<br> <a href="http://i39.tinypic.com/20sfuc3.jpg" rel="nofollow noreferrer">alt text http://i39.tinypic.com/20sfuc3.jpg</a><bR> How it appears in IE7/8:<br> <a href="http://i40.tinypic.com/24511rl.jpg" rel="nofollow noreferrer">alt text http://i40.tinypic.com/24511rl.jpg</a> <br> <br> Any ideas on how to force IE 7/8 to render correctly after the ajax callback is complete?</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload