This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

how i can have 2 Action for one Form with image as button?

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for reading my post
Hi how i can use an Struts Image as a button to call some action ?
I have two action wich i should decide about them on user click .
e.g : a login form with a register and logIn button . i want to use image as buttons
what is solution pleas.


Thank you.
[ June 01, 2005: Message edited by: Ramina Nibilian ]
 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Include the image using struts image tag and write little script onclick of the image button and submit the form. In javascript you can decide which action depending on the event.
 
Ramina Nibilian
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thank you for reply
I do Not know the Script required here.
could you pleas give me a link to web page or post required script
here ?
where should i write the script ?


Thank you.
 
Srilakshmi Vara
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First let me know what type of actions you want on two different submits
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See here. That shows you how to set up a form to use ImageButtonBeans. Then use a DispatchAction to dispatch on the property of your form which determines which button was pushed. So if you follow the example and have a getSelected() method for instance, then you can have your DispatchAction specify parameter="selected" in your <action-mapping> element.
 
Something must be done about this. Let's start by reading this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!