hi ,
Iam Nagesh,Begineer in using Ajax,well
i have been using ajax in application, i have faced a problem while placing the responseTEXT into the <div> tag positioned inside the <form> tag
iam able to get the response in the <div> tag in mozilla (im takingthe HTML response),
<script>
function confirm()
{
xmlHttp=GetXmlH ttpObject();
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
var url="confirm.js p";
url=url+"?q="+d ocument.login.i d.value;
//url=url+"&sid=" +Math.random();
url=url+"&p="+d ocument.login.p wd.value;
//url=url+"&pid=" +Math.random();
xmlHttp.onready statechange=sta teChanged;
xmlHttp.open("G ET",url,true) ;
xmlHttp.send(nu ll);
}
function stateChanged()
{
if (xmlHttp.readyS tate==4)
{
alert("hi");
//var message = xmlHttp.respons eXML.getElement sByTagName("mes sage")[0].childNodes[0].data;
//alert(message);
alert("everone" );
alert(xmlHttp.r esponseText);
var response=xmlHtt p.responseText;
document.getEle mentById("hema" ).innerHTML=res ponse;
alert(xmlHttp.r esponseText);
alert("Hi in state changed");
}
<script>
and the form iam using in the <body> is
<form name="login">
<table align="center" >
<tr>
<td><b>UserId :</b></td>
<td><input type="text" name="id"></td>
</tr>
<tr>
<td><b>Password </b></td>
<td><input type="password" name="pwd"></td>
</tr>
</table>
<div align="center">
<p><input type="button" value="Login" onclick="confir m()"></p>
</div>
<div>
<p>For Registration Click Here   ;<input type="button" value="Register " onclick="regist er()"></p>
</div>
<div id="hema"></div>
</form>
so the issue is that i will get the html response in the script that should be displayed in the <div id="hema"> tag.
It is working in mozilla but not in IE, any answers.., thanks
Iam Nagesh,Begineer in using Ajax,well
i have been using ajax in application, i have faced a problem while placing the responseTEXT into the <div> tag positioned inside the <form> tag
iam able to get the response in the <div> tag in mozilla (im takingthe HTML response),
<script>
function confirm()
{
xmlHttp=GetXmlH ttpObject();
if (xmlHttp==null)
{
alert ("Your browser does not support AJAX!");
return;
}
var url="confirm.js p";
url=url+"?q="+d ocument.login.i d.value;
//url=url+"&sid=" +Math.random();
url=url+"&p="+d ocument.login.p wd.value;
//url=url+"&pid=" +Math.random();
xmlHttp.onready statechange=sta teChanged;
xmlHttp.open("G ET",url,true) ;
xmlHttp.send(nu ll);
}
function stateChanged()
{
if (xmlHttp.readyS tate==4)
{
alert("hi");
//var message = xmlHttp.respons eXML.getElement sByTagName("mes sage")[0].childNodes[0].data;
//alert(message);
alert("everone" );
alert(xmlHttp.r esponseText);
var response=xmlHtt p.responseText;
document.getEle mentById("hema" ).innerHTML=res ponse;
alert(xmlHttp.r esponseText);
alert("Hi in state changed");
}
<script>
and the form iam using in the <body> is
<form name="login">
<table align="center" >
<tr>
<td><b>UserId :</b></td>
<td><input type="text" name="id"></td>
</tr>
<tr>
<td><b>Password </b></td>
<td><input type="password" name="pwd"></td>
</tr>
</table>
<div align="center">
<p><input type="button" value="Login" onclick="confir m()"></p>
</div>
<div>
<p>For Registration Click Here   ;<input type="button" value="Register " onclick="regist er()"></p>
</div>
<div id="hema"></div>
</form>
so the issue is that i will get the html response in the script that should be displayed in the <div id="hema"> tag.
It is working in mozilla but not in IE, any answers.., thanks
Comment