Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes Passing parameter with a Submit Link Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Passing parameter with a Submit Link" Watch "Passing parameter with a Submit Link" New topic
Author

Passing parameter with a Submit Link

jhon masco
Ranch Hand

Joined: May 13, 2010
Posts: 93
Hi everybody.
I want to pass parameter with a Submit Link similar to this:

I am working in a servlet, this servlet request all the chekboxes from a list (with getParameterValues). I saw that getParameterValues work only with a Submit button therefore I am trying to use the code above.
But the Submit action work ok but...the parameters (name and estado) are not passing!!!
Is possible to pass parameters with a Submit link ???

PD: the parameters work fine if I use something similar to:

but I dont use it because I need the Submit action

If you need more details let me know. Sorry for my english.

Muchas Gracias
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Use hidden tags in your form. (I'm moving this thread to a more appropriate forum)


[My Blog]
All roads lead to JavaRanch
jhon masco
Ranch Hand

Joined: May 13, 2010
Posts: 93
Christophe Verré wrote:Use hidden tags in your form. (I'm moving this thread to a more appropriate forum)

OK
But it is not possible to pass hidden input from a link, I think.
Also I forget to say that are 5 links, every link have a diferent parameter "name"

Thanks
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

If you make an onClick event on the link (example), which would submit the form with the hidden fields, you'll get them. You can pass the name attribute to the submit function, and set the hidden field value dynamically.
jhon masco
Ranch Hand

Joined: May 13, 2010
Posts: 93
Christophe Verré wrote:If you make an onClick event on the link (example), which would submit the form with the hidden fields, you'll get them. You can pass the name attribute to the submit function, and set the hidden field value dynamically.


Thanks Christophe toooooo much for the Tips ans link.
I had resolved the problem

Muchas Gracias
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing parameter with a Submit Link
 
Similar Threads
Cannot set attribute in request in jsp
How to detect if a request value contains a String or a Stringarray
Hyeprlinks inside servlet
Parent form reload
doble condition with ternary operator