Ajax loaded element not recognized in ajax post send(element)?
I have a div that is loaded via ajax. In the div is a select box. I am having trouble getting the value from the select box
Code:
function testA(){
var test=document.getElementById("toUser").value;
alert(test);
}
^ This does not work.
Code:
function testA(){
var test=document.getElementById("toUser");
alert(test);
}
^ This returns null.... any idea?
Ultimately i'm trying to pass the variable 'test' via ajax post request (ie: xmlhttp.send(test);) but when i specify .value on the var it jams the ajax request up?