wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes why it doesn't  forward the action with 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 "why it doesn Watch "why it doesn New topic
Author

why it doesn't forward the action with link ?

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 438
hi , i have a button and a link which call doForward() , but how come link will not work but button is working fine ?

doForward() :

where doCheckComplete() is validation for necessary fields not in blank,

button :


link :


when i click on button , it work !
when i click on link , it doesn't ! (even the doForward() is called and it display alert after the line submit())

besides, is it possible i can use image to fire doForward() ?
i have try below :


it actually call the form action rather than doForward()'s action

thank you for guidance
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
with the image you need to return false;

onclick="doForward();return false;"

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why it doesn't forward the action with link ?
 
Similar Threads
Struts Validator Issues
Form submitting
Form is submitting more than once
How to link different buttons to different action methods
html:link tag with javascript handler