Ver Mensaje Individual
  #4 (permalink)  
Antiguo 23/10/2007, 10:06
Avatar de Shiryu_Libra
Shiryu_Libra
Colaborador
 
Fecha de Ingreso: febrero-2007
Ubicación: Cantando "Screenager" en "Kirafa Kaput"
Mensajes: 3.614
Antigüedad: 18 años, 1 mes
Puntos: 88
Re: problema al cargar pagina con input y boton

gaby, analizemos, tu boton solo aparece si no existe, verdad???

ok... en caso afirmativo, modifiquemos tu Funcion de busqueda un poco.....
Cita:
function buscar(sistema)
call conectarDB
Dim sSQL, rs
sSQL = "Select sistemas_id, sistemas_nombre, sistemas_linea FROM DS_Sistemas where sistemas_id = '"& sistema &"'"
Set rs = cnn.execute(sSQL)

if Err=0 then
%> <table align="left">
<tr>
<%
'si es el final del archivo, NO EXISTE, mandamos el boton GUARDAR

if rs.eof=true then
%>
<td width="167" height="36">
<input name="Guardar" type="image" value="submit" id="Guardar" src="http://www.forosdelweb.com/images/GUARDAR1.gif" style=" visibility: visible;" onclick="Metodos(this.id)" />

</td>
<%
'SI EXISTE, mandamos los botones MODIFICAR, BORRAR, IMPRIMIR
else%>

<td width="167" height="36">
<input name="Modificar" type="image" id="Modificar" src="http://www.forosdelweb.com/images/modificar1.gif" style=" visibility:visible;" /></td>
<td width="159">
<input name="Borrar" type="image" id="Borrar" src="Images/ELIMINAR1.gif" style=" visibility: visible;" /></td>
<td width="72">
<input type="image" src="http://www.forosdelweb.com/images/IMPRIMIR1.gif" name="Imprimir" id="Imprimir" style=" visibility: visible;" /></td>
<%end if%>
</tr>
<input type="hidden" id="metodo" name="metodo" />

</table>
<%end if
call desconectarDB
end function
esto es mas sencillo que traer una variable, lo hacemos directamente desde nuestra busqueda y el resultado es similar....

hay procesos que son mas sencillos, desde el codigo previo, asi no tendras tantos dolores de cabeza

__________________
"Eres parte del problema, parte de la solucion o parte del paisaje"
Un Saludo desde Desierto de Altar, Sonora, MX.
Shiryu_libra