Hi,
I am working on jsp page. From servlet class I am retrieving the combobox as
Servlet class:
String buffer=;
buffer=buffer+<option >hi</option>;
buffer=buffer+<option >bye</option>;
Jsp file:
function getSearch()
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
xmlHttp.onreadystatechange=stateChangedSearch;
xmlHttp.open("POST","servlet_className?value="+99,true);
xmlHttp.send(null);
}
function stateChangedSearch ()
{
if (xmlHttp.readyState==4)
{
document.getElementById("loc").innerHTML=xmlHttp.responseText;
}
}
<body>
<select id=t1 name=t1>
<span size="100" id=" loc" >
</span>
</select>
</body>
But the <option> String value from ajax script response is not allocating to <div id=loc>, showing error object required.