Professional Documents
Culture Documents
samp.jsp
<%--
Document : samp.jsp
Created on : Sep 4, 2010, 9:02:37 PM
Author : VIP
--%>
<html>
<head>
<title>JSP Page</title>
<script type="text/javascript">
var xmlhttp
function loadContent(str)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
{
alert ("Your browser does not support Ajax HTTP");
return;
}
var url="load.jsp";
url=url+"?q="+str;
xmlhttp.onreadystatechange=getOutput;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
function getOutput()
{
if (xmlhttp.readyState==4)
{
document.getElementById("prtCnt").innerHTML=xmlhttp.responseText;
}
}
function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
{
return new XMLHttpRequest();
}
if (window.ActiveXObject)
{
return new ActiveXObject("Microsoft.XMLHTTP");
}
return null;
}
</script>
</head>
<body>
Load.jsp