He's probably trying to control which page gets submitted to depending on
which button on the form gets pressed.
Bob Barrows
SimonFx wrote:
Can I just ask why don't you do:
<form id=ins method="post" ACTION="file2.asp">
Is this to force compatibility with a particular browser-only
environment? Does using javascript add some extra flexibility or
power? Or is it just the way some Microsoft tool automatically
generates forms?
Just curious.
- Simon
Walter wrote: Hi,
The user has to type his name into input a input field (type =
text). This name must be passed to another ASP file.
I did this but nothing happened:
<form id=ins method="post" onsubmit="return doit()">
Type your name:<input id=txt1 type="text">
<INPUT id=smt TYPE="submit">
</form>
...
function doit()
{
document.getElementById("ins").action="file2.asp"
return true;
}
...
When the user types his name and clicks on the submit button, it
goes to file2.asp but the request.form("txt1") is empty.
Do i have to use "hidden" input type instead?
Thanks
Walter
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"