By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,874 Members | 1,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,874 IT Pros & Developers. It's quick & easy.

post link

P: n/a
Is it possible to create a link that can post a value to an ASP page without
java?
Jul 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
I don't believe so. At least not in any browser I've seen. You either use
an input button, an image input, or onclick javaSCRIPT. You may want to ask
in a browser group, however.

Ray at work

"Dodo" <do**@no.fly> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Is it possible to create a link that can post a value to an ASP page without java?

Jul 19 '05 #2

P: n/a
What are you trying to do exactly.
This link posts a value to an ASP Page...

<a href="www.yourdomain.com?value=thevalue">The Link</a>

Although I would recommend using a form with a hidden field with the
data and the button as the link.

Brynn

On Tue, 13 Jan 2004 04:31:19 -0000, "Dodo" <do**@no.fly> wrote:
Is it possible to create a link that can post a value to an ASP page without
java?


I participate in the group to help give examples of code. I do not guarantee the effects of any code posted. Test all code before use!

Brynn
www.coolpier.com
Jul 19 '05 #3

P: n/a
"Brynn" <z@z.com> wrote in message
news:40**************@news.comcast.giganews.com...
What are you trying to do exactly.
This link posts a value to an ASP Page...

<a href="www.yourdomain.com?value=thevalue">The Link</a>


No it doesn't. The above passes the value through the query string, which
is not the same as a POST. With a form POST (<form method="post" ...), more
data can be passed than if you used method="get" (or passing via the query
string). Also, POSTed data is not visible in the query string.

Regards,
Peter Foti
Jul 19 '05 #4

P: n/a

Yes, of course ...

I simply assumed that by post, he was using plain english description
of what he wanted, rather than technical term post.

The querystring is not immediately visible (in the querystring).
However, it sounds as if you have a value in mind if you are trying to
get a link to pass it ... which means that the form you would be using
would probably have a hidden field with the data in it ... which is
visible through View Source ... but ANYWAY.

Also, the querystring ... I think ... only holds around 2000ish
characters ... never really pushed it pass 100 personally, and only
for navigation ... not for data.

So AS I STATED before, I would use the hidden field / form technique
with a submit button or image submit button.

If you are in a controlled environment, or trust everyone to keep
javascript on in their browsers (I will usually trust most to keep
javascript on) ... you could even have a text link with a javascript
onClick command to submit the form.
At least with the javascript way, you could put the form anywhere in
your design of the page, since it won't be seen ... and the link will
be able to submit the form without being inside it.

<form name="yourForm" method="post" action="/youraction.asp">
<input type="hidden" value="your value">
</form>

<a href="#" onClick="document.yourForm.submit();">Your Link</a>

Anyway, now that, that confusion is over with :)

Please let me know if this helps or you need further.

Brynn
www.coolpier.com

On Tue, 13 Jan 2004 11:45:19 -0500, "Peter Foti"
<pe***@Idontwantnostinkingemailfromyou.com> wrote:
"Brynn" <z@z.com> wrote in message
news:40**************@news.comcast.giganews.com.. .
What are you trying to do exactly.
This link posts a value to an ASP Page...

<a href="www.yourdomain.com?value=thevalue">The Link</a>


No it doesn't. The above passes the value through the query string, which
is not the same as a POST. With a form POST (<form method="post" ...), more
data can be passed than if you used method="get" (or passing via the query
string). Also, POSTed data is not visible in the query string.

Regards,
Peter Foti


I participate in the group to help give examples of code. I do not guarantee the effects of any code posted. Test all code before use!

Brynn
www.coolpier.com
Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.