Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't load Select from Ajax with IE9
    primarykey
    data
    text
    <p>I have a select element that I fill with file names using ajax. </p> <p>The HTML is:</p> <pre><code>&lt;select id='load_dropdown' name=loads help_token="load_dropdown" title=""&gt; &lt;option value='' selected='selected'&gt;LOAD&lt;/option&gt; &lt;/select&gt; </code></pre> <p>The call to fill the element is:</p> <pre><code> $('select#load_dropdown') .load('getFiles.php', {list : 'LOAD'}); //fill the load drop down list </code></pre> <p>getFiles.php: is </p> <pre><code>$dir = $_SESSION['user']['id'] . "/xmls/"; // files are in xmls dir if ($dirHandle = opendir($dir) ){ } else { echo ("&lt;br /&gt;getFiles.php: $dir not found."); exit; } echo ("&lt;option selected='selected' value=''&gt;&lt;b&gt; $list &lt;/b&gt; &lt;/option&gt;"); // first line of this drop down option while (false !== ($fileName = readdir($dirHandle))) { if ($fileName == "." || $fileName == "..") { continue; } $fileNames[] = $fileName; // collect file names } sort($fileNames); foreach ($fileNames as $fileName) { $displayName = basename($fileName, '.xml'); // cut .xml at end echo ("&lt;option value='$displayName'&gt;" . $displayName . "&lt;/option&gt;"); } } </code></pre> <p>This works fine for Firefox, Chrome, Safari, and IE10. It doesn't work for IE9.</p> <p>With IE9 the select element does not fill with the loaded information, though I can see that getFiles.php call is returning the correct data. After the call the select element is </p> <p><img src="https://i.stack.imgur.com/tjxkd.jpg" alt="enter image description here"></p> <p>Does anyone know what's going on with IE9?</p> <p>Thanks.</p>
    singulars
    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.
 

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