

| ||||
Pues mas bien deberias poner el codigo que no funciona, no entiendo por que el action del formulario no lo pudiste cambiar con javascript, pero de nuevo, necesitariamos ver el codigo Salu2,
__________________ "El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera." -- Ernest Hemingway |
| ||||
Ok Hola U_G te coloco el codigo y gracias por tu Respuesta y dedicacion: Pagina: CPersonal.asp <script> function Agrega(){ document.formulario.Botom.value=1; document.formulario.submit(); } function Elimina(){ document.formulario.Botom.value=2; document.formulario.submit(); } function Salir(){ document.formulario.Botom.value=3; document.formulario.submit(); } function Nuevo(){ document.formulario.Botom.value=4; document.formulario.submit(); } </script> </HEAD> <BODY> conexionBD <form name="formulario" method="post" action="Cpersonal.asp"> <%dim correo, usu, cadena, clave,tabla,tabla2 cadena=Request.Form("txtcorreo") clave=Request.Form("txtclave") opciones() %> <%if cadena="" then%> <%Response.Redirect "index.asp" %> <%else if verificacorreo()=1 then set tabla=coneccion.Execute("select * from USUARIOS WHERE Correo='"&usu&"' and Clave='"&clave&"' ") if tabla.EOF then Response.Redirect "index.asp" else Menu()%> ......... <%end if end if end if tabla.close set tabla=nothing end if%> <%sub opciones() if Request.form("Botom")="4" then Server.transfer "CEnvio.asp" end if if Request.form("Botom")="3" then response.redirect "index.asp" end if if Request.form("Botom")="1"then Server.transfer "contactos.asp" end if if request.form("Botom")="2" then valores=request.form("checkbox") if valores<>"" then elimina="delete from CORREO where Num in ("&valores&");" coneccion.Execute (elimina) end if end if end sub%> <%sub Menu()%> <table border=0 width="15%" ><tr> <td><input type="text" name="Botom" Value="<%=request.form("Botom")%>"></td> <td><input type="image" name="Nuevo" src="images/Nuevo.jpg" alt="Redactar Correo" onclick="javascript:Nuevo();"></td> <td><input type="image" name="Elimina" src="images/Eliminar.jpg" alt="Elimina" onclick="javascript:Elimina();"></td> <td><input type="image" name="Contactos" src="images/contacto.jpg" alt="Agrega Contacto" onclick="javascript:Agrega();"></td> <td><input type="image" name="Salir" src="images/salir.gif" alt="Salir" onclick="javascript:Salir();"></td> </tr></table> <%End sub%> </form></body>.. CEnvio.asp <HEAD> <script> function Adjunta(){ document.formulario.txtB.value=2; alert(document.formulario.txtB.value); document.formulario.submit(); } </script> </HEAD> <BODY > <form name="formulario" action="CEnvio.asp" method="POST" > <input type="text" name="txtB" value="<%=request.form("txtB")%>"> <%opciones() MenuE()%> <table width="226"> <tr><td width="216" height="24" valign="top"><input type="TEXT" name="txtD" size=30 value="<%=Request.form("txtcorreoP")%>" ></td> <td width="216" height="24" valign="top"><input type="TEXT" name="txtcorreo" size=30 value="<%=Request.form("txtcorreoP")%>" maxlength=50></td> <td width="216" height="24" valign="top"><input type="TEXT" name="txtT" size=8 value="<%=Request.form("txtTa")%>"></td> <td width="216" height="24" valign="top"><input type="TEXT" name="txtN" size=15 value="<%=Request.form("txtNo")%>"></td> <td width="216" height="24" valign="top"><input type="TEXT" name="txtU" size=20 value="<%=Request.form("txtDi")%>"></td> <td width="216" height="24" valign="top"><input type="TEXT" name="txtclave" size=20 value="<%=Request.form("txtclaveP")%>"></td> </tr> </table> ............... <%sub opciones()%> <%if request.form("txtB")="1" then Server.transfer "VerificaEnvio.asp" end if%> <%response.write ("Ingreso a ADJUNTAR") if request.form("txtB")="2" then response.redirect "AdjuntarA.asp" end if%> <%if request.form("txtB")="3" then Server.transfer "Contactos.asp" end if%> <%if request.form("txtB")="4" then Server.transfer "CPersonal.asp" end if%> <%end sub%> <%sub MenuE()%> <table width="112" border=0> <tr> <td><input type="image" name="Grabar" src="images/buzon.jpg" alt="Grabar" ></td> <td><input type="image" name="Adjuntar" src="images/Adjuntar.jpg" alt="Adjuntar" onclick="javascript:Adjunta();" ></td> <td><input type="image" name="Contactos" src="images/direccion.jpg" alt="Contactos" ></td> <td><input type="image" name="Cancelar" src="images/aspa.jpg" alt="Cancelar" ></td> </tr> </table> <%end sub%> </form></body> Bien, espero k este bien entendible ah y tben cuando hago click en una de las opciones no las ejecuta y regresa a la anterior pagina k lo llamó, osea CPersonal.asp Gracias por su atención |