ForEach em Formulário
Olá pessoal,
tenho um formulário com aproximadamente 20 campos e através do foreach recupero seus valores. Porém os campos estão vindo de forma desordenada, diferente da ordem que aparecem no formulário.
Exemplo:
<form method="post" action="FrmSubmit.asp">
<table width="250" border="0" align="center" cellpadding="3" cellspacing="2">
<tr>
<td width="23%">Nome:</td>
<td width="77%"><input type="text" name="textfield" id="textfield" /></td>
</tr>
<tr>
<td><input type="text" name="textfield2" id="textfield2" /></td>
<td><input type="text" name="textfield3" id="textfield3" /></td>
</tr>
<tr>
<td><input type="text" name="textfield4" id="textfield4" /></td>
<td><input type="text" name="marca" id="textfield5" /></td>
</tr>
<tr>
<td><input type="text" id="Nome" /></td>
<td><input type="text" name="textfield7" id="textfield7" /></td>
</tr>
<tr>
<td> </td>
<td><input type="text" name="textfield9" id="textfield9" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><input type="text" name="textfield10" id="textfield10" /></td>
<td><input type="text" name="textfield8" id="textfield8" /></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="button" id="button" value="Submit" /></td>
</tr>
</table>
</form>
Para pegar os dados:
<%
For each i in Request.Form
response.Write request.form(i)&"<br/>"
Next
%>
Resultado:
recipient
subject
from
title
button
redirect
textfield
textfield2
textfield3
textfield4
textfield7
textfield9
textfield10
textfield8
marca
' ' alert('\n Erro:0'); ' '
O campo marca não e o ultimo do FORM!!
Alguem sabe o que ocorre?
Vlw
Discussão (4)
Carregando comentários...