Set your form method to "post"...
<form name="f1" method="post" action="">
-----Original Message-----
From: Mihai Cristian Bocai [mailto:mihai.bocai@r...]
Sent: Wednesday, April 25, 2001 10:34 AM
To: Shaun Steckley
Subject: Re: dynamic form actions
> Do you initialize your form action to "page1.asp?
What do you mean by this???
suppose this code:
...........file1.asp..............
.
.
.
<script language="JavaScript">
function changeAction()
{
document.f1.action="file2.asp?id=1";
document.f1.submit();
}
</script>
<form name="f1" action="">
.....Some elements.....
</form>
.
.
<a href="javascript:changeAction();"><img src="img1.gif"></a>
</html>
.......end file1.asp...................
.........file2.asp........................
.
.
.
Dim var1
var1=request.querystring("id");
response.write var1 & "Some text"
.
.
.
.........end file2.asp................
Now what i see is just:
Some text
and not:
1Some text
???
any idea?
-----Original Message-----
From: Shaun Steckley
Sent: Wednesday, April 25, 2001 8:55 AM
To: 'javascript'
Subject: RE: [javascript] Re: dynamic form actions
Do you initialize your form action to "page1.asp"? If so, this means that
your javascript is never run. Paste more of your code for help...
-----Original Message-----
From: Mihai Cristian Bocai [mailto:mihai.bocai@r...]
Sent: Wednesday, April 25, 2001 6:01 AM
To: javascript
Subject: [javascript] Re: dynamic form actions
> There is no reason why it should not work.
>
> You can retrieve the variable with Request.QueryString("id") in page1.asp
this is exactly my code..:-)
but is not working! the parameter is not sent by the first page containing
the javascript code!
document.myform.action="page1.asp?id=1";
document.myform.target="_blank";
the url of the new page opened on form submit is ...page1.asp and not
...page1.asp?id=1
so the querystring is useless, because there is no string after the
"page1.asp" !
any idea?