Dear All,

Presently I am working on ajax and JavaScript and having a problem. Due to which I am unable to progress in my work.

I am not able to call the JavaScript functions at the innerhtml of a div which I am getting from xhr's response test.

In index.jsp at line 94 at divId.innerHTML=val; , I am putting the editform16.jsp. But no javascript functions of editform16.jsp are working.

I am pasting these two files..

Please help me sir.


var url="editform16.jsp?conno="+valu;
var xmlHttp;

if (window.XMLHttpRequest) { // Mozilla, Safari, ...

var xmlHttp = new XMLHttpRequest();

}
else if (window.ActiveXObject)
{ // IE
try
{
// Try to create XMLHttpRequest in later versions of Internet Explorer
var xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
//Try version supported by older versions of Internet Explorer
var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
try{
xmlHttp.onreadystatechange=getInfo;
xmlHttp.open("POST",url,true);
xmlHttp.send();
}catch(e){alert("Unable to connect to server");}

function getInfo()
{
if(xmlHttp.readyState==4 && xmlHttp.status==200)
{
var val=xmlHttp.responseText;

var divId = document.getElementById("pageload");
divId.style.display = "block";
divId.innerHTML=val;


Now no javascript functions of editform16.jsp (which I am getting as response text) are working. Please how to call javascript functions within innerHTML onj Onclick etc etcc