Script

download Script

If you can't read please download the document

description

Codigo generado

Transcript of Script

/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

var xhr;

function crearObjeto(){

if(window.ActiveXObject){

xhr=new ActiveXObject("Microsoft.XMLHttp");

}else if((window.XMLHttpRequest)|| (typeof XMLHttpRequest)!= undefined){

xhr=new XMLHttpRequest();

}else{

alert('su navegador no soporta AJAX');

return ;

}

enviaPeticion();

}

function enviaPeticion(){

var usuario=document.getElementById("usu").value;

var contrasena=document.getElementById("contra").value;

xhr.open("GET","LoginAcceso?usuario="+usuario+"&&contrasena="+contrasena,true);

xhr.onreadystatechange=verificaDetalle;

xhr.send(null);

}

function verificaDetalle(){

if(xhr.readyState==4){

document.getElementById("detalle").innerHTML=""+xhr.responseText+"";

}

}