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

Can I POST from a link?

P: n/a
I just want to set a link to a new page that needs some parameters
but I don't want these to be seen in the location bar (and don't want
to hide it). Is there any way to do it?

(I try to generate a POST form on the fly and submit it. It works but
this form is included in the history object an is accesed through the
back button. [using form.submit() can't use Location.replace() :-( ])

ThankYou for any help.

German.

Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"German B. Garcia" <ge****@we.lc.ehu.es> writes:
I just want to set a link to a new page that needs some parameters
but I don't want these to be seen in the location bar (and don't want
to hide it). Is there any way to do it?

(I try to generate a POST form on the fly and submit it. It works but
this form is included in the history object an is accesed through the
back button. [using form.submit() can't use Location.replace() :-( ])


Why generate it on the fly?

You can have the form already on the same page as the link, just hidden
from view (make all inputs type="hidden" or something). Then you can fill
in the fields, if they need to change, and have the link submit it.
Just make sure that the link does something useful if Javascript is not
available.
/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

P: n/a
You can do it with iframes.
Place your form in iframe or create iframe named "example". Set atribute
target="example" of your form and then submit it.
Your page with parameters will be change inside iframe, but your primary
page will stay.
Of course You can hide iframes with styles. ;)

Pozdro!
SzokU, Poland
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.