The moose likes HTML, CSS and JavaScript and the fly likes Submit form with dynamic paramter Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Submit form with dynamic paramter" Watch "Submit form with dynamic paramter" New topic
Author

Submit form with dynamic paramter

vineet kumar chaudhry
Ranch Hand

Joined: Apr 02, 2011
Posts: 44
Hi JavaLovers


Now what I want is that when Go is clicked I want to call the test.jsp with the value which is curently there in the "theDate" field
How can I acheive this?
It is not necessary to pass it as query string.Any approach will work..
Thanks


Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50693

Simply submit the form that contains the input elements.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50693

And why is the button in an anchor element? That's really weird and likely to cause all sorts of problems with event handling.
vineet kumar chaudhry
Ranch Hand

Joined: Apr 02, 2011
Posts: 44
Thanks for your reply .I am done with it

Could you please tell me what are the problems when we put the the button in anchor tag.Does it creates problem or is it not a good practice to do do?
Bear Bibeault
Author and opinionated walrus
Marshal

Joined: Jan 10, 2002
Posts: 50693

It's a very bad practice. The button is an active element on its own, what is the point of putting it inside the anchor element?
 
 
subject: Submit form with dynamic paramter
 
Threads others viewed
How to retain the old values?
How to getParameter value
On click and calling jsp page
Struts+JSP
Disable a button in Firefox and Chrome but not in IE
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture