
25/10/2007, 10:20
|
 | | | Fecha de Ingreso: junio-2005
Mensajes: 672
Antigüedad: 19 años, 11 meses Puntos: 0 | |
Re: no despliega valor modificado ? y estas son mis funciones en javascript
Código:
function getHTTPObject() {
var xmlhttp;
/*@cc_on
@if (@_jscript_version >= 5)
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) { xmlhttp = false; }
}
@else
xmlhttp = false;
@end @*/
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) { xmlhttp = false; }
}
return xmlhttp;
}
var enProceso = false; // lo usamos para ver si hay un proceso activo
var http = getHTTPObject(); // Creamos el objeto XMLHttpRequest
var strCondicion;
function handleHttpResponse() {
if (http.readyState == 4) {
if (http.status == 200) {
if (http.responseText.indexOf('invalid') == -1) {
// Armamos un array, usando la coma para separar elementos
results = http.responseText.split(",");
//alert(results);
document.getElementById("nombre").value = results[0];
strCondicion = results[1]; //alert(strCondicion);
activarboton(strCondicion);
enProceso = false;
}
}
}
}
function Buscar(dato) {
if (!enProceso && http) {
var valor = escape(document.getElementById(dato).value);
var url = "enviarGpoUser.asp?datoabuscar="+ valor;
// alert(valor)
http.open("GET", url, true);
http.onreadystatechange = handleHttpResponse;
enProceso = true;
http.send(null);
// alert(url)
}
}
function activarboton(condicion){
//alert(condicion + " hola");
if (condicion == 0){
document.getElementById("Guardar").style.visibility = "visible";
document.getElementById("Modificar").style.visibility = "hidden";
document.getElementById("Borrar").style.visibility = "hidden";
document.getElementById("Imprimir").style.visibility = "hidden";
}
else{
if(condicion == 1){
document.getElementById("Modificar").style.visibility = "visible";
document.getElementById("Borrar").style.visibility = "visible";
document.getElementById("Imprimir").style.visibility = "visible";
document.getElementById("Guardar").style.visibility = "hidden";
}
}
}
function Metodos(idMetodo)
{
document.getElementById('metodo').value=idMetodo;
//alert(idMetodo);
document.form1.submit();
}
__________________ " Recuerda , estas donde debes estar ..." |