This line:
Code:
document.getElementById("txthint").innerHTML=xmlHttp.responseText
pretty much ensures that only one element, the one with txthint as its id will display the imported content. You could do something like so:
Code:
function getfilter(str,str1,el)
{
getfilter.el=el;
xmlHttp=GetXmlHttpObject() . . .
and later:
Code:
function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById(getfilter.el).innerHTML=xmlHttp.responseText
}
}
Then when you call getfilter(), pass the id of the target element along with the query string data, examples:
Code:
getfilter('bob', 'albert', 'txthint')
Code:
getfilter('alice', '', 'txthint2')
Bookmarks