• 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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.
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic