Ver Mensaje Individual
  #3 (permalink)  
Antiguo 16/02/2007, 13:36
Avatar de locojars
locojars
 
Fecha de Ingreso: mayo-2002
Mensajes: 265
Antigüedad: 22 años, 9 meses
Puntos: 4
Re: Formularios Desplegables como pestañas

Veamos si esto te ayuda:

Código HTML:
<script language="JavaScript">
	function mostrar_form()
	{
	    document.f1.reset();
  		document.getElementById("form_contacto").style.visibility='visible';
		document.getElementById("form_contacto").style.position='absolute';
		document.getElementById("form_contacto").style.left='125px';
		document.getElementById("form_contacto").style.top='125px';
	}

	function procesar_form()
	{
	  document.f1.action="formularios.php?opcion=insertar";
	  document.f1.submit();
          document.getElementById("form_contacto").style.visibility='hidden';
	}
</script> 
Y en tu body tienes esto:
Código:
<a href="#" onclick="javascript:mostrar_form();">[Buscar]</a>
<div id="form_contacto" style="background-color:#E3F5DC; width:375px; border-top:1px solid #000000;border-left:1px solid #000000;border-right:1px solid #000000;border-bottom:1px solid #000000;visibility:hidden">
<table border="0" align="center" width="100%">
  <form method="post" name="f1" action="">
.... tu formulario.
<input type="button" value="Buscar" onClick="procesar_form();">
</form>
</div>
Mira a ver si esto te funciona, la idea es que te muestre el div al presionar el link de buscar y que al procesar el formulario lo esconda. Mira a ver si esto te ayuda.
Salud2,