Can I POST from a link?

  • Thread starter German B. Garcia
  • Start date
G

German B. Garcia

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.
 
L

Lasse Reichstein Nielsen

German B. Garcia said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top