This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes problem in using map  tag for mapping an action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem in using map  tag for mapping an action" Watch "problem in using map  tag for mapping an action" New topic

problem in using map tag for mapping an action

Ranjith Koppu

Joined: Dec 04, 2006
Posts: 7
I am facing a problem in mapping an action in my form.Actually,my form contains 2 hyperlinks(say h1,h2) and an image (say img1)and a submit button.
If I click the submit button the form has to perform an action say "" .If I click the link h1 then it has to perform some other action "" If I click h2 or img1 I should perform the same action (say "")
for the hyper link h1 I coded it as
<html:link action"">text</html:link>
For the image ideally it should be written as
<html:link action""><img src../></html:link>

But the problem is the image I have is a huge one and I have a logo on the image.only that part of the image should act as a hyperlink.
so I used a map tag like

<img src="\images\activate_bttn.gif" width=254 height=48 usemap="#Map1">
<map name="myMap" id="Map1">
<area shape="rect" coords="30,10,150,40" href=" ActivationPage.html" alt="Activate Now" />

This works fine with HTML as such but how should I give an action attribute
to the <map> or is there any alternative to do this.
Only particular portion of the image should be clickable and it should perform some action.
Please help me!!
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: problem in using map tag for mapping an action
It's not a secret anymore!