Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function chk_usuario(){
- var pos_url = 'comprueba.asp';
- var nombre = document.getElementById('solicitante').value;
- var req = new XMLHttpRequest();
- if (req) {
- req.onreadystatechange = function() {
- if (req.readyState == 4 && (req.status == 200 || req.status == 304)) {
- document.getElementById('solicitante').innerHTML = req.responseText;
- }
- }
- req.open('GET', pos_url +'?nombre='+nombre,true);
- req.send(null);
- }
- }
- <input type="text" name="solicitante" id="solicitante" value="solicitante"
- class="form-control input-sm" onkeyup="chk_usuario();" />
- <div id="solicitante"> </div>
- comprueba.asp
- response.expires=-1
- nombre=request.querystring("nombre")
- SQL1="select * from dotacion where ID = '"&nombre&"' "
- Set Rs1 = Con2.Execute(SQL1)
- if Rs1.eof = false then
- nombres = Rs1("nombres")
- Apellido_Pat = Rs1("a_paterno")
- Apellido_Mat = Rs1("a_materno")
- nom_sucursal = Rs1("GLOSA_OFICINA")
- Cargo = Rs1("CARGO")
- End if
- response.write (nombres)
- ademas, los valores quiero mostrarlos en otros inputs del formulario, nose
- si sera posible esto. de antemano gracias.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement