Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP IE9 XML Issue
    primarykey
    data
    text
    <p>I have a page that displays XML info in a table. The XML files are server side and I'm using PHP to get the file names and data using a drop down box. JSON is used to put the names in the dropdown and DOM to send the XML across. That works fine in all browsers. </p> <p>There is an issue with my adding entries feature. When I add an entry in Chrome or Firefox it shows up the next time that table is selected. It doesn't work in IE9 though. The entries are added to the xml file but to view these changes in IE I have to open a new tab. Simply refreshing doesn't work. To redirect in this script I use the header function:</p> <pre><code>header('Location: ./client2.html'); </code></pre> <p>Is there something that needs to be added here for IE or is there an issue somewhere else. I've added the php that gets the data when the file is chosen.</p> <pre><code>ini_set('display_errors',1); error_reporting(E_ALL); /* gets the selected file to use to return data */ $xml_filename = './XML/'.$_REQUEST['file']; $xml = simplexml_load_file($xml_filename); /* gets the root of the selected file */ $rootname = $xml-&gt;getName(); /* gets the children in that root */ $children = $xml-&gt;children(); $firstchild = $children[0]; // gets the table headings $data = '{"headings":['; foreach ($firstchild as $elem) { $data = $data.'"'.$elem-&gt;getName().'",'; } // removes trailing ',' $data = substr_replace($data,"",-1); $data = $data.'],'; // gets the cell values $data = $data. '"vals":['; foreach ($children as $child) { $data = $data.'['; foreach ($child as $elem =&gt; $vals) { $data = $data.'"'.$vals.'",'; } $data = substr_replace($data,"",-1); $data = $data.'],'; } // removes trailing ',' $data = substr_replace($data,"",-1); $data = $data.']}'; /* sends created JSON string back to client */ echo $data; </code></pre>
    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.
    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