Dear All,
I have form where I add dynamic html element as below. In the php code via ajax I have built the full drop down list. So when I post the form in IE when I do like this $masterID=$_POST; I am able to capture the form value. But in both firefox and chrome it shows me empty. Any solution please?
function getMaster(entID,nextElement)
{
var table = document.getElementById('myTable');
var rowCount = table.rows.length;
//alert("Row count : "+rowCount);
if(rowCount>2)
{
for(var i=2; i<rowCount; i++)
{
var row = table.rows[i];
table.deleteRow(i);
rowCount--;
i--;
}
}
differentiator=Math.floor(Math.random()*50000);
//if (str=="")
// {
// document.getElementById("cbTrailerList").innerHTML="";
// return;
// }
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
//alert("Test : "+xmlhttp.responseText);
//document.getElementById("cbTrailerList").innerHTML=xmlhttp.responseText;
var x=document.getElementById('myTable').insertRow(2);
var y=x.insertCell(0);
var z=x.insertCell(1);
y.innerHTML="<label class=description for=element_1>Master <font color='red'>*</font></label> ";
z.innerHTML=xmlhttp.responseText;
var a=document.getElementById('myTable').insertRow(3);
var b=a.insertCell(0);
var c=a.insertCell(1);
b.innerHTML="";
c.innerHTML="<p class=error id='masterIDError'>";
if(nextElement=="trailer")
{
getTrailer(entID);
}
else
{
getSlaves(entID);
}
}
}
xmlhttp.open("GET","getMasterList.php?e="+entID+"&d="+differentiator,true);
xmlhttp.send();
}