Function createobj (){
If (window. activexobject ){
Return (New activexobject ("Microsoft. XMLHTTP "));
}
Else if (window. XMLHttpRequest ){
Return (New XMLHttpRequest ());
}
}
function personalinfo () {
var obao = createobj ();
var cont = document. getelementbyid ("person_detial");
var cont_a = document. getelementbyid ("person_content");
Cont. style. display = 'block';
Cont. style. cursor = 'pointer ';
cont_a.innerhtml = "Please wait, loading... ";
var my_url =" getinfo. asp? "+ Math. random ();
obao. open ("get", my_url, true);
obao. onreadystatechange = function () {
If (obao. readystate = 4) {
If (obao. status = 200) {
cont_a.innerhtml = obao. responsetext;
}else {
cont_a.innerhtml = "error, error Code :" + obao. status;
}< BR >}< br> obao. send ();
}
Function drag (ID)
{
VaR self = this;
This. OBJ = (typeof (ID) = "string ")? Document. getelementbyid (ID): ID;
This. obj. onmousedown = function (E)
{
E = E | window. event;
VaR OBJ = self. OBJ; // point to yourself
If (E. layerx) {obj. Position = {X: E. layerx, Y: E. layery };}
Else {obj. Position = {X: E. offsetx, Y: E. offsety };}
Document. onmousemove = self. Start;
Document. onmouseup = self. end;
}
This. Start = function (E)
{
E = E | event;
Document. onselectstart = function () {return false ;};
Window. getselection & window. getselection (). removeallranges ();
VaR OBJ = self. OBJ;
OBJ. style. Left = E. clientX-obj.position.x + "PX ";
OBJ. style. Top = E. clientY-obj.position.y + "PX ";
}
This. End = function (E)
{
E = E | event;
Document. onmousemove = Document. onmouseup = Document. onselectstart = NULL;
}
}
Ajaxsimple application ‑release-Rar