Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
HTML Pages with CSS and JavaScript
submit form on click of any hyperlink
Neeraj Vij
Ranch Hand
Posts: 315
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I want to submit a form, on clcik of any of the hyperlink on the page.
is there any way to do it ?
thanks
neeraj
Gregg Bolinger
Ranch Hand
Posts: 15304
6
I like...
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
add an on click event to all the links and do a form submit in JavaScript. A better question is
why
you would want to do this.
Neeraj Vij
Ranch Hand
Posts: 315
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
is there any short way of doing it
there are too many hyperlinks and jsps to do this
I want to carry a value of a parameter to the next page, when a hyperlink is clicked
thanks
Neeraj.
Eric Pascarello
author
Posts: 15385
6
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Well you could make your
jsp
append the qs parameter to the links in the first place.
If JS is disabled, the JavaScript solution is not going to work.
basiclaly you need to add onclick handlers to every link and call
document.formName.submit()
Eric
Neeraj Vij
Ranch Hand
Posts: 315
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks Eric.
I also don't want the value of the variable to be visible in the query
string
.
thanks
neeraj/
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Then the form should have a method of POST.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Hyperlink and submit
How to submit the form using hyperlink
passing a parameter without form - from jsp to servlet
Special charecters in URL
How to hide a variable coming in URL
More...