At this point you would do whatever you want like search through company names or employee names. At the end of it to return the value you would do this:
echo $foo1 . "/" . $foo2 . "/" . $foo3 . "/" . $foo4. "/"When the data is sent back it is one long string. I had 4 squares beside each other so I had to go back and forth to get it to show below each other. This required me to split it up. You will see above that I hard coded "/" in between them. That is my value I'm looking for when I called
var data = xmlhttp.responseText.split ("/"); document.getElementById("htmlid").innerHTML=data[x]; var foo = data[x]+" ext "+data[x];the X is the position that it is located at in the return string when split up. The one below it shows how you could add 2 values that are returned. An example of that would be firstname + lastname. The htmlid is the value in the html code for example:
<td id='htmlid'></td>When that is called it replaces whatever is currently being displayed next to htmlid. I was also successful in doing this with replacing whitespace with more drop downs to choose from. If I didn't explain this correctly or called something wrong, please post it in the comments and I'll change it.