Originariamente inviato da mediashopcenter
mi potresti fare un esempio e poi la applico ?
ma con javascript poi devo gestire l'invio su 2 pagine diverse, giusto ?
pagina.html
codice:
<form method="post" action="select.asp">
campo1 <input type="text" name="test1" />
campo2 <input type="text" name="test2" />
<input type="submit" value="invia" />
</form>
select.asp
codice:
<%
test1 = request.form("test1")
test2 = request.form("test2")
if len(test1) > 0 then
fieldName = "test1"
value = test1
action = "test1.asp"
elseIf len(test2) > 0 then
fieldName = "test2"
value = test2
action = "test2.asp"
end if
if len(action) > 0 then
%>
<form name="test" method="post" action="<%=action%>">
<input type="hidden" name="<%=fieldName%>" value="<%=value%>" />
</form>
<script language="javascript" type="text/javascript">
<!--
document.test.submit();
//-->
</script>
<%
end if
%>
A questo punto hai le pagine di destinazione:
test1.asp che recupera il dato dal campo di nome test1
test2.asp che recupera il dato dal campo di nome test2