aspose file tools*
The moose likes Servlets and the fly likes parameter passing with href Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "parameter passing with href" Watch "parameter passing with href" New topic
Author

parameter passing with href

varkala prabhakar
Ranch Hand

Joined: Sep 08, 2001
Posts: 54
Hi all,
I my work, i get the url from the database and this is to be displayed as a link.I am using href for the link. When i click on the url, url parameters are displayed.
I cannot keep a submit button for the link to hide the parameters.
I want to hide the parameters, Can any one tell me how to hide the parameters.
thank you..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Not sure if I'm getting your question straight or not, but here's a shot:
You want to create a link that will submit a request complete with request parameters, but do not want to display those parameters as part of the URL.
If so, I'd create a form with all the parameters that you want to submit as hidden values. This form would have no page-visibile components. Then, when the link is clicked, you submit the form via JavaScript (no submit button necessary).
For example:

hth,
bear
[ March 25, 2003: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
You can create a form with hidden variables and use the POST method so the variables will not appear in the URL. Naturally you will have to handle the request in doPost. Any basic HTML reference will tell you how to create a form.
Bill
varkala prabhakar
Ranch Hand

Joined: Sep 08, 2001
Posts: 54
Hi William,
Whether Form can be handled with out a submit button.
I should not have a submit button, Just a link and parameters should be hidden
Hi Bear Bibeault, I will check with your function.
thanks
prabhakar.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: parameter passing with href