Ir para conteúdo
Fórum Script Brasil
  • 0

Problema Com Forms


ju_rezende

Pergunta

olá pessoal na minha pagina tenho 2 formularios, meu problema é que ´quando digito algo no 2º formulário e clico no btão procurar ele mostra a página do primeiro formulário, alguém poderia me ajudar com isso ?

Vou deixar meu código para olharem ....

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Comércio de Jacareí</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<div id="Layer1" style="position:absolute; left:300px; top:72px; width:107px; height:16px; z-index:1"pesquisamostrab.asp" method="post">

  <%dim busca

db = server.MapPath ("dados\treino.mdb")

set con = server.CreateObject("adodb.connection")

set rs = server.CreateObject ("adodb.recordset")

set rs1 = server.CreateObject ("adodb.recordset")

sql1 = "select distinct Bairro from clientes where del=0"

sql = "select distinct Categoria from clientes where del=0"

con.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("..\dados\treino.mdb") &";Persist Security Info=False"

rs.Open sql,con,3,3

rs1.Open sql1,con,3,3%>

1º  form<form id="procurar" method="post" action="pesquisa.asp" name="form1">

  <font face="Arial">

  <select style="width: 130px;" name="Bairro">

    <%rs1.movefirst%>

    <option>Bairro</option>

    <% do while rs1.eof = false %>

    <option>

    <%response.write rs1("bairro")%>

    </option>

    <% rs1.movenext %>

    <%loop %>&nbsp;

   

  </select>

  </font> </div>

<div id="Layer2" style="position:absolute; left:434px; top:73px; width:109px; height:17px; z-index:2">

  <font face="Arial">

  <select style="width: 130px;" name="categoria">

    <%rs.movefirst%>

<option>Categoria</option>

    <% do while rs.eof = false %>

    <option>

    <%response.write rs("categoria")%>

    <% rs.movenext %>

    </option>

    <%loop %>&nbsp;

   

  </select>

  </font> </div>

<div id="Layer3" style="position:absolute; left:566px; top:72px; width:108px; height:17px; z-index:3">

  <input type="text" name="Empresa" style = "width: 120">

</div>

<div id="Layer4" style="position:absolute; left:690px; top:74px; width:68px; height:39px; z-index:4">

<input type="image" img src="../images/novasimagens/botao/bntprocurar.jpg" alt= "procurar" onclick="document.getElementById('procurar').submit()"></div>

<table width="339" border="0" cellpadding="0" cellspacing="0">

  <tr>

    <td colspan="3"><img src="../images/novasimagens/1.gif" width="770" height="112" border="0" usemap="#Map">

      <img src="../images/novasimagens/2.gif" width="769" height="89"> </td>

  </tr>

  <tr>

    <td colspan="3" heig="14">&nbsp;</td>

  </tr>

  <tr>

    <td width="147" valign="top"><img src="../images/novasimagens/pesquisa3.gif" width="147" height="648" border="0" usemap="#Map2">

    </td>

    <td width="442" valign="top"><table width="460" border="0" cellspacing="0" cellpadding="0">

        <tr>

          <td background="../images/novasimagens/fundodaTd.gif">

<div align="center"><font color="#990000" size="2" face="Arial, Helvetica, sans-serif"><strong>Digite

              o endereco da empresa que deseja procurar</strong></font></div></td>

        </tr>

2º form <form name="form2" method="post" action="Enderecomostra.asp" id="Endereco">

        <tr>

            <td align="center"><input name="NomeBusca" type="text"></td>

 

        </tr>

        <tr>

            <td align="center"><input type="image" img src="../images/novasimagens/botao/bntprocurar.jpg" alt= "procurar" onclick="document.getElementById('Endereco').submit()"></div></td>

   

        </tr>

  </form>

      </table> </td>

Link para o comentário
Compartilhar em outros sites

6 respostass a esta questão

Posts Recomendados

  • 0

valeu mesmo pela ajuda.........................

Funcionou mas </form> fica visivel .....

veja se eu fecheicerto...

1º form<form id="procurar" method="post" action="pesquisa.asp" name="form1">

<font face="Arial">

<select style="width: 130px;" name="Bairro">

<%rs1.movefirst%>

<option>Bairro</option>

<% do while rs1.eof = false %>

<option>

<%response.write rs1("bairro")%>

</option>

<% rs1.movenext %>

<%loop %>&nbsp;

</select>

</font> </div>

<div id="Layer2" style="position:absolute; left:434px; top:73px; width:109px; height:17px; z-index:2">

<font face="Arial">

<select style="width: 130px;" name="categoria">

<%rs.movefirst%>

<option>Categoria</option>

<% do while rs.eof = false %>

<option>

<%response.write rs("categoria")%>

<% rs.movenext %>

</option>

<%loop %>&nbsp;

</select>

</font> </div>

<div id="Layer3" style="position:absolute; left:566px; top:72px; width:108px; height:17px; z-index:3">

<input type="text" name="Empresa" style = "width: 120">

</div>

<div id="Layer4" style="position:absolute; left:690px; top:74px; width:68px; height:39px; z-index:4">

<input type="image" img src="../images/novasimagens/botao/bntprocurar.jpg" alt= "procurar" onclick="document.getElementById('procurar').submit()"></form></div>

Link para o comentário
Compartilhar em outros sites

  • 0

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Comércio de Jacareí</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<div id="Layer1" style="position:absolute; left:300px; top:72px; width:107px; height:16px; z-index:1"pesquisamostrab.asp" method="post">

  <%dim busca

db = server.MapPath ("dados\treino.mdb")

set con = server.CreateObject("adodb.connection")

set rs = server.CreateObject ("adodb.recordset")

set rs1 = server.CreateObject ("adodb.recordset")

sql1 = "select distinct Bairro from clientes where del=0"

sql = "select distinct Categoria from clientes where del=0"

con.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("..\dados\treino.mdb") &";Persist Security Info=False"

rs.Open sql,con,3,3

rs1.Open sql1,con,3,3%>

<form id="procurar" method="post" action="pesquisa.asp" name="form1">

  <font face="Arial">

  <select style="width: 130px;" name="Bairro">

    <%rs1.movefirst%>

    <option>Bairro</option>

    <% do while rs1.eof = false %>

    <option>

    <%response.write rs1("bairro")%>

    </option>

    <% rs1.movenext %>

    <%loop %>&nbsp;

   

  </select>

  </font> </div>

<div id="Layer2" style="position:absolute; left:434px; top:73px; width:109px; height:17px; z-index:2">

  <font face="Arial">

  <select style="width: 130px;" name="categoria">

    <%rs.movefirst%>

<option>Categoria</option>

    <% do while rs.eof = false %>

    <option>

    <%response.write rs("categoria")%>

    <% rs.movenext %>

    </option>

    <%loop %>&nbsp;

   

  </select>

  </font> </div>

<div id="Layer3" style="position:absolute; left:566px; top:72px; width:108px; height:17px; z-index:3">

  <input type="text" name="Empresa" style = "width: 120">

</div>

<div id="Layer4" style="position:absolute; left:690px; top:74px; width:68px; height:39px; z-index:4">

<input type="image" img src="../images/novasimagens/botao/bntprocurar.jpg" alt= "procurar" onclick="document.getElementById('procurar').submit()"></div>

<table width="339" border="0" cellpadding="0" cellspacing="0">

  <tr>

    <td colspan="3"><img src="../images/novasimagens/1.gif" width="770" height="112" border="0" usemap="#Map">

      <img src="../images/novasimagens/2.gif" width="769" height="89"> </td>

  </tr>

  <tr>

    <td colspan="3" heig="14">&nbsp;</td>

  </tr>

  <tr>

    <td width="147" valign="top"><img src="../images/novasimagens/pesquisa3.gif" width="147" height="648" border="0" usemap="#Map2">

    </td>

    <td width="442" valign="top"><table width="460" border="0" cellspacing="0" cellpadding="0">

        <tr>

          <td background="../images/novasimagens/fundodaTd.gif">

<div align="center"><font color="#990000" size="2" face="Arial, Helvetica, sans-serif"><strong>Digite

              o endereco da empresa que deseja procurar</strong></font></div></td>

        </tr>

</form>

<form name="form2" method="post" action="Enderecomostra.asp" id="Endereco">

        <tr>

            <td align="center"><input name="NomeBusca" type="text"></td>

 

        </tr>

        <tr>

            <td align="center"><input type="image" img src="../images/novasimagens/botao/bntprocurar.jpg" alt= "procurar" onclick="document.getElementById('Endereco').submit()"></div></td>

   

        </tr>

  </form>

      </table> </td>

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.


  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      651,9k
×
×
  • Criar Novo...