wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Forms containing links Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Forms containing links" Watch "Forms containing links" New topic

Forms containing links

Tom Panahil

Joined: May 31, 2006
Posts: 2
I want to pass a bunch of parameters with a request, and currently use links, but do not like exposing all the parameters.

I want to use a form with hidden input fields, but still want to have the link, and have it look/act like a link, just have it do the form submit method only.

Any thoughts?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60810

Moved to the HTML/Javascript forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60810

Use javascript to submit the hidden form upon clicking the link:

Be sure that the form method is POST.
[ May 31, 2006: Message edited by: Bear Bibeault ]
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
All of that hidden information is still game for people to see and change so do not think it is any safer.

I agree. Here's the link: http://aspose.com/file-tools
subject: Forms containing links
Similar Threads
Form Submit, as link outside Form Tag
Clickable links and request params in a dataTable
using a href link to pass parameters to servlet.
How to pass more than 1 parameters into the sevlet???
Question on Links using struts