File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Image submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Image submit" Watch "Image submit" New topic

Image submit

Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362
I have an image and 2 select boxes. On click of the image i just want to shift the values from one select box to another. I have all the JS for this. It owrks fine with buttons, but for images the whole form is can i prevent form submit for this image click and execute only JS...

Am using struts
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
onclick="yourFunction();return false;"
Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362
I agree. Here's the link:
subject: Image submit
Similar Threads
Disabling Submit Button
input type=image with JS
invoke js method
how to access method of js from the popup
Can I hide a Ajax/JS in a JSP, pr can I run a Ajax/JS code in server side?