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
Win a copy of
Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework
this week in the
Java in General
forum!
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
Tim Cooke
paul wheaton
Liutauras Vilda
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Devaka Cooray
Paul Clapham
Saloon Keepers:
Scott Selikoff
Tim Holloway
Piet Souris
Mikalai Zaikin
Frits Walraven
Bartenders:
Stephan van Hulst
Carey Brown
Forum:
HTML Pages with CSS and JavaScript
submit form on click of any hyperlink
Neeraj Vij
Ranch Hand
Posts: 315
posted 14 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 14 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 14 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 14 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 14 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: 67752
173
I like...
posted 14 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
]
Look! It's Leonardo da Vinci! And he brought a tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
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...