les digo el proceso que hago,
1.entro a la pagina
2. capturo texto en el 1er input
3. le doy tab, y hace la funcion buscar y trae valores al formulario
4. le doy click al boton imprimir, abre ventana, la cierro
5. vuelvo a ponerme en el 1er input para consultar otro dato
6. le doy tab y no hace la funcion dentro del onblur()
que puede seeer????
funcion buscar:
Código:
function Buscar(dato) {
if (!enProceso && http) {
var valor = escape(document.getElementById(dato).value);
var url = "enviarClasificacion.asp?datoabuscar="+ valor;
http.open("GET", url, true);
http.onreadystatechange = handleHttpResponse;
enProceso = true;
http.send(null);
}
}
Código:
function Metodos(idMetodo)
{
document.getElementById('metodo').value=idMetodo;
document.form1.submit();
}
function Imprimir(idDato){
if (idDato == "Imprimir"){
id = document.getElementById("siglas").value;
window.open("ImprimirClas.asp?id="+ id,"","width=550,height=300,status=yes,toolbar=no,menubar=no,location=no,scrollbars=no");
}
document.getElementById("siglas").value = "";
document.getElementById("nombre").value = "";
document.getElementById("mensaje").value = "";
}
mi formulario :
Código:
<form method="post" action="clasificacion.asp" id="form1" name="form1">
<table width="100%" cellpadding="0" cellspacing="0">
<tr><td>Siglas de la clasificación: <br />
<table><tr><td><span class="dtobligatorio"> * </span>
<input name="siglas" type="text" id="siglas" value="<%=Siglas%>" size="20" maxlength="5" onblur="Buscar(this.id)" /></td>
<td><!--<input name="ver" type="image" id="ver" value="buscar" onclick="abrepopup(this.id); return false;" src="Images/20_VER1.jpg" />--></td>
</tr></table></td></tr>
<tr><td>Nombre de la clasificación: <br /><span class="dtobligatorio"> * </span>
<input name="nombre" type="text" id="nombre" value="<%=Nombre%>" size="87" maxlength="100" />
</td>
</tr>
<tr><td>Enviar correo automático:<br /><span class="dtobligatorio"> * </span>
<select name="correo" id="correo">
<option value="S">Si</option>
<option value="N">No</option>
</select> </td></tr>
<tr><td>Mensaje que será enviado por correo:<br /><span class="dtobligatorio"> * </span>
<input name="mensaje" type="text" id="mensaje" value="<%=Mensaje%>" size="87" maxlength="255" />
</td></tr>
<tr><td>Tipo de Actividad:<br /><span class="dtobligatorio"> * </span>
<select name="tipoactividad" id="tipoactividad">
<option selected="selected" value="-1">Seleccionar</option>
<% call conectarDB
strquery = "Select actividades_id, actividades_nombre FROM DS_TipodeActividades"
Set rs = cnn.execute(strquery)
do while not rs.eof%>
<option value="<%=rs("actividades_id")%>" <%if rs("actividades_id") = Request("tipoactividad") then%>selected="selected"<%end if%>><%=rs("actividades_nombre")%></option>
<%rs.movenext
loop
rs.close
Set rs = nothing
call desconectarDB
%>
</select>
</td></tr>
<tr><td><br /><br /></td></tr>
<tr><td>
<table align="center">
<tr>
<td width="167" height="36">
<input name="Guardar" type="image" value="submit" id="Guardar" src="images/GUARDAR1.gif" style=" visibility: hidden;" onclick="Metodos(this.id)" /></td>
<td width="167" height="36">
<input name="Modificar" type="image" value="submit" id="Modificar" src="images/modificar1.gif" style=" visibility: hidden;" onclick="Metodos(this.id)" /></td>
<td width="159">
<input name="Borrar" type="image" value="submit" id="Borrar" src="Images/ELIMINAR1.gif" style=" visibility: hidden;" onclick="Metodos(this.id)" /></td>
<td width="72">
<input name="Imprimir" type="image" value="submit" id="Imprimir" src="images/IMPRIMIR1.gif" style=" visibility: hidden;" onclick="Imprimir(this.id)" /></td>
</tr>
<input type="hidden" id="metodo" name="metodo" />
</table>
</td></tr>
<tr><td class="dtobligatorio"><br /><br />(*) Datos obligatorios</td></tr>
</table>
</form>

