USUÁRIO:      SENHA:        SALVAR LOGIN ?    Adicione o VBWEB na sua lista de favoritos   Fale conosco 

 

  Fórum

  ASP - Active Server Page
Voltar
Autor Assunto:  Fazer funcionar form dentro de form ?
vilmarbr
Pontos: 2843
SAO PAULO
SP - BRASIL
Postada em 22/09/2004 11:55 hs         
Bom dia,
 
Como fazer funcionar form dentro de form ?
Eu tentei acionar o form que está dentro do outro por botão submit e por JS document.frmX.submit(); , mas nenhuma das 2 formas fez submeter o form de dentro.
 
Usando botão submit apenas submeteu o form de fora, vejam como está o código:
 
<table border="0" cellpadding="0" cellspacing="5" width="98%">
  <form name="frmAltUser" action="alt_user_conf.asp?BDCli=<%=BDCliEncr%>&DPSeq=<%=DPSeq%>&FotoAtual=<%=DPFoto%>" method="POST" enctype="multipart/form-data" onSubmit="javascript:return Verificar();" onReset="javascript:document.frmAltUser.pwdSenha.focus();">
    <tr>
      <td colspan="2" align="center">
   <font size="2" face="Verdana">
   <strong>Altera&ccedil;ão de <%=Session("TextoUsuario")%></strong>
   </font>
   </td>
    </tr>
    <tr>
      <td colspan="2" align="center">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2"> <font size="1" face="Verdana"> <strong>Senha:&nbsp;&nbsp;</strong>
        <input name="pwdSenha" type="password" style="font-family: verdana; font-size: 7 pt; background-color: #EBEBEB; font-weight: bold" value="<%=DPSenha%>" size="10" maxlength="10">
        <font color="#FF0000">*</font> <strong>&nbsp;E-mail:&nbsp;&nbsp;</strong>
        <input name="txtEmail" type="text" style="font-family: verdana; font-size: 7 pt; background-color: #EBEBEB; font-weight: bold" value="<%=DPEmail%>" size="30" maxlength="50">
        <font color="#FF0000">*</font>
        <input name="hidEmailAntigo" type="hidden" value="<%=DPEmail%>">
        </font> </td>
    </tr>
    <tr>
      <td colspan="2"> <font size="1" face="Verdana"> <strong>&nbsp;Foto:&nbsp;</strong>
        <input name="filFoto" type="file" size="40">
        <br>
        <font color="#FF0000"> &nbsp;Envie foto no formato .jpg com tamanho m&aacute;ximo
        de 100 kb. </font></font> </td>
    </tr>
    <tr>
      <td colspan="2">
   <form name="frmUsuMembro" action="usu_membro.asp" method="post" enctype="application/x-www-form-urlencoded">  
      <table width="530" bgcolor="#EFEFEF" border="0" cellpadding="0" cellspacing="5">
          <tr>
            <td>
     <fieldset>
              <legend><strong><font size="1" face="Verdana">Cadastrar Parentesco</font></strong></legend>
              <table width="100%" border="0" cellpadding="0" cellspacing="5">
                <tr>
                  <td>
      <strong><font size="1" face="Verdana">Grau Parentesco:&nbsp;&nbsp;
                    <input name="txtGrauParentesco" type="text" style="font-family: verdana; font-size: 7 pt; background-color: #EBEBEB; font-weight: bold" value="" size="40" maxlength="40">
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </font></strong> </td>
                </tr>
    <tr>
      <td height="19">
     <strong><font size="1" face="Verdana"><%=TextoUsuMembro%>:&nbsp;
     <input type="text" name="txtNome" value="" size="40" maxlength="40" readonly style="font-family:verdana; font-size:7 pt; font-weight:bold; color:#0099CC; background-color:#EFEFEF; border:none;">&nbsp;&nbsp;
     <input type="hidden" name="hidCodSeq" value="">
     <input type="button" name="btnUsuMembro" value="Escolher <%=TextoUsuMembro%>" onClick="javascript:PopUpCentralizada('popup_usu_membro.asp?BDCli=<%=BDCliEncr%>','PopUpEscUsuMembro','790','560',0,'scrollbars=yes,status=no,location=no,toolbar=no,menubar=no,top=0,left=0');">
     <input type="button" name="btnGravarUsuMembro" value="Gravar <%=TextoUsuMembro%>" onClick="javascript:frmUsuMembro.submit();">
     </font></strong>
      </td>
    </tr>
              </table>
              </fieldset>
   </td>
          </tr>
        </table>
     </form>
   </td>
    </tr>
    <tr>
      <td colspan="2"> <font color="#FF0000" size="1" face="Verdana"> * Este campos
        s&atilde;o obrigat&oacute;rios </font> </td>
    </tr>
    <tr>
      <td colspan="2" align="center"> <input name="btnCancelar" type="button" onClick="javascript:history.back();" value="  Cancelar  ">
        &nbsp;&nbsp; <input type="submit" value="  Gravar  " name="btnCadastro">
        &nbsp;&nbsp; <input name="btnLimpar" type="reset" value="  Limpar  ">
      </td>
    </tr>
  </form>
</table>
 
Grato,

http://www.vilmarbro.com.br
     
Ricardo Lerma
SÃO VICENTE
SP - BRASIL
Postada em 22/09/2004 13:53 hs         
Olá Vilmar,
 
Fiz alguns teste com seu código e realmente ele não enxerga o segundo form, para comprovar isto fiz o teste usando document.forms[1].submit(), mas não achou! você tem a necessidade dos forms ficarem um dentro do outro?
 
Abraços,

VBWEB - O Portal do Desenvolvedor

Agora o VBWEB também hospeda sites!
isto mesmo! conheçam os planos do VBWEB Hosting

     
vilmarbr
Pontos: 2843
SAO PAULO
SP - BRASIL
Postada em 22/09/2004 13:57 hs         
Oi,
No meu caso eu tenho!
Eu tb. tinha feito o teste com a coleção forms e só está enxergando o
 de índice zero forms[0]
Se n tiver mesmo jeito vou usar iframe ou colocar este form no final da tela!
 
Valeu...

http://www.vilmarbro.com.br
     
vilmarbr
Pontos: 2843
SAO PAULO
SP - BRASIL
Postada em 23/09/2004 11:44 hs         
Oi,
Eu acabei mesmo usando apenas um form e mudando a action e enctype dinamicamente
através de clique em botão usando JS e rodou legal!

http://www.vilmarbro.com.br
     
Página(s): 1/1    


Seu Nome:

Seu eMail:

ALTERAR PARA MODO HTML
Mensagem:

[:)] = 
[:P] = 
[:(] = 
[;)] = 

HTML DESLIGADO

     
 VOLTAR

  



CyberWEB Network Ltda.    © Copyright 2000-2026   -   Todos os direitos reservados.
Powered by HostingZone - A melhor hospedagem para seu site
Topo da página