-
Hi,
Is there a way to pass a value to an ASP page that expects data from the POST method; i.e. using
Code:
MyVal=Request.Form("MyVal")
without having the SUBMIT button on the preceeding page.
Basically, I am trying to hide what gets sent to the next page when a regular link is clicked.
Thanks in advance.
-
Why not use the hidden text field
<INPUT type="hidden" name="myhidden">
you can then change it's value using javascript
Ian
-
but...
Er..., even with <INPUT type="hidden" name="myhidden">, I still need to have the SUBMIT button on the screen, am I right?
Is there a way to send the information when a regular link like post hidden info is clicked?
-
yeah you do the followin
<a href="#" onclick="document.formname.submit();">assa</a>
-
Sorry, I did that wrong
<a href="document.formname.submit();">Click here</a>
-
I will get it right.
<a href="javascript:document.sitesearch.submit();">click here</a>
-
Thanks
Thanks Ianpbaker,
The last one worked.
-
IP*Works provide server components for ASP, one of which allows you to download a web page to a variable...and it lets you send GET or POST info with the request too. :)
If you're cool enough then you'll have it installed on your own server... if not http://www.brinkster.com offer it with their premium membership.
Alternately do like Ianpbaker suggests...or take it one stage further and send a page back to the browser like:
Code:
<html>
<head>
<title>Whatever</title>
</head>
<body onload="javascript:autoform.submit()">
<form name="autoform" action="whateverpage.asp" method="post">
<input type="hidden" name="somevalue" value="blah">
<input type="hidden" name="someothervalue" value="blah">
<input type="hidden" name="somethingelseagain" value="more blah">
</form>
</body>
</html>