function createXMLHttpRequest()
{
// branch for native XMLHttpRequest object
if (window.XMLHttpRequest)
{
xmlHttp = new XMLHttpRequest();
}
// branch for IE/Windows ActiveX version
else if (window.ActiveXObject)
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlHttp;
}
function change(paramValue)
{
var url = "<%=request.getContextPath()%>/actionName.do?method=methodName¶mName=" + paramValue;
xmlHttp = createXMLHttpRequest();
xmlHttp.open("POST", url, false);
xmlHttp.onreadystatechange = doSomething;
xmlHttp.send(null);
}