The XMLHTTP of Ajax

Source: Internet
Author: User
Tags exit

<script type= "Text/javascript" language= "JavaScript" >
<!--
Fetching data in XML
function Xmlpost (theemail)
{
var webfileurl = ". /user/checkuser.aspx? Logonname= "+ theemail;
var result = "";

if (window. ActiveXObject) {
XmlHttp = new ActiveXObject ("Microsoft.XMLHTTP");
}
else if (window. XMLHttpRequest) {
XmlHttp = new XMLHttpRequest ();
}

var xmlHttp = new ActiveXObject ("MSXML2. XMLHTTP ");
Xmlhttp.open ("POST", Webfileurl, false);
Xmlhttp.setrequestheader ("Content-type", "application/x-www-form-urlencoded");
Xmlhttp.send ("");

Xmlhttp.onreadystatechange=function ()
{
if (xmlhttp.readystate==4)
{
result = Xmlhttp.responsetext;
}
}
if (xmlhttp.status!=200)
{
Alert (' Network failure (xmlhttp.status= ' +xmlhttp.status+ '), please try again later! ');
}

result = Xmlhttp.responsetext;
result = Result.substring (0,result.indexof) ("? EX "));

If (Result!= "false")
{
return true;
}
Else
{
return false;
}
}
-->
</script> "' <summary>
"" Detects if the user exists < filename:. /user/checkuser.aspx>
"' </summary>
"' <remarks>created by Dzh @2006/06/27 18:22</remarks>
Partial Class Web_user_checkuser
Inherits System.Web.UI.Page

Protected Sub Page_Load (ByVal sender as Object, ByVal e as System.EventArgs) Handles Me.load
If request.querystring ("LogonName") is nothing Then
Response.Write ("False +"?) EX ")
Response.End ()
Exit Sub
End If

If (New EasyClick.EasyBusiness.UserBusiness). Getuserbylogonname (Request.QueryString ("LogonName"). ToString) is nothing Then
Response.Write ("False +"?) EX ")
Response.End ()
Exit Sub
Else
Response.Write ("True +"?) EX ")
Response.End ()
Exit Sub
End If
End Sub
End Class

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.