I need to pass javascript variable "textVal" to a jsp.I just can't figure correct syntax. My code is like this
function show(textVal){
AJAX.onreadystatechange = handler;
AJAX.open("POST","service.jsp",true);
AJAX.setRequestHeader("Content-type","application/x-www-form-urlencoded");
AJAX.send("fname='+textVal+'");
};
How do i pass this textVal to service.jsp
.send()AJAXis not defined?AJAX? It's probably not safe for me to assume it's anXMLHttpRequestinstance, but it's also not safe to assume it's not. They seem to have the basics down - usingonreadystatechange,open,setRequestHeader, andsendproperly. It might've been easier to ask and figure out whatAJAXwas instead of thinking they know nothing