This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes submitting a form 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 "submitting a form" Watch "submitting a form" New topic
Author

submitting a form

Leonardo Go
Greenhorn

Joined: Jun 13, 2004
Posts: 13
can i submit a form using a text instead of a submit button ?
what i want is when a user clicks on a word "Submit the form" within my page then i can submit form1 to a jsp page.
how can i do this ?

thnx in advance


Problems are made to be solved.
Kj Reddy
Ranch Hand

Joined: Sep 20, 2003
Posts: 1704
Make "Submit the Form" as link and on click event of that link call a JavaScript function, and in the javascript function submit your form. If you need more details let me know.
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Moving this to the HTML and JavaScript forum...


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
<p onclick="document.FormName.submit()">Text</p>

or

<a href="javascript:"document.FormName.submit()">Text</a>


Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: submitting a form
 
Similar Threads
2 forms in a page?
Cant get JSP code to work inside layer
both javascript and serverside validations running
Another simple question
2 forms in a single page