On 11/25/05, Laurie Harper <[EMAIL PROTECTED]> wrote:
> Malhotra, Amitkumar (Exchange) wrote:
> > Hello Folks,
> >
> > Am using <html:link action="someaction"> tag to invoke an action when a
> > hyperlink is clicked,
> >
> > Do want to pass parameters to the action class when this is done and
> > do not want these to be visible in the address bar, how can I do this ??
>
> By definition a link with parameters (or a form submitted as a GET
> request) is going to result in the parameters being visible in the
> browser's address bar. If that's unacceptable, you'll have to use a form
> POST instead.
>
> There are two ways you can do that: change your link to a button with an
> enclosing form, and use hidden inputs for the parameters; or use
> client-side Javascript to convert the link into a POST request on the
> fly (which of course will only work if Javascript is enabled).

The third option is to redirect to "clean" location immediately after
you received GET request with query parameters. You can see example
here: http://www.superinterface.com/mailreader Hover over language
options, the links contain query parameters like this:

<p>Choose Language<br/>
<a href="/mailreader/Home.do?DIALOG-EVENT-LOCALE=1&language=en">English</a><br/>
<a href="/mailreader/Home.do?DIALOG-EVENT-LOCALE=1&language=ru">Russian</a>
</p>

Select a language and then check the address bar: it will be "clean",
containing only /Home.do with no parameters.

Michael.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to