[eluser]Unknown[/eluser]
Good morning to all.
I have an issue of compatibility between Firefox and IE.
I have a table layout which is predefined but its content is not.
On a button click, an xajax call is made to generate the table content.
The following code works great in Firefox but nothing in IE.
Following the code is the modification i tried with no sucess.
Table layout in view
Code:
<?php
foreach ($Slist as $s){
echo "<table id=\"tblSup".$s['Sup_Id']."EmpList\" class=\"hidden\">";
echo "<tbody>";
echo "test in view";
echo "</tbody>";
echo "</table>";
?>
$s['Sup_Id'] is passed from the controller as $data and this part works fine.
Ajax function in controller
Code:
function __GenEmpTable($sup){
$objResponse = new xajaxResponse();
$this->load->database('....');
$tbl ="<tr><th colspan=\"2\">List Employes</th></tr>";
$query = $this->db->query("Select LName,FName from SupToEmp where Sup_ID = '".$sup."'");
$x=0;
foreach($query->result_array() as $emp){
$tbl = $tbl. "<tr> <td width=\"80%\"><input type=\"text\" readonly=\"true\" value=\"".$emp['FName']."\" id=\"fname".$sup."_".$x."\"/><input type=\"text\" readonly=\"true\" value=\"".$emp['LName']."\" id=\"lname".$sup."_".$x."\"/></td>";
$tbl = $tbl. " <td><input type=\"checkbox\" size=\"3\" id=\"chkbx".$sup."_".$x."\"/></td></tr>";
$x++;
}
$tblid ="tblSup".$sup."EmpList";
$objResponse->Assign($tblid,"value", $tbl);
// $objResponse->Assign("tstajaxId","innerHTML",$tblid);
return $objResponse;
}
This code works A1 in firefox but nothing in IE
i tried commenting all $tbl line and changing the Objresponse $tbl for some text like: "Listing"
still the same.
the commented $objResponse is a div for testing ajax, this one worked fine in both FF and IE.
It seems that IE does not process innerHTML into a table.
Hope someone knows more than me on this and can help me get this working.
Thanks.