This content has been marked as final.
Show 4 replies
-
1. Re: Anyone got an elegant clickable image map solutions
danielc.roth Apr 28, 2008 4:37 PM (in response to gothmog)I have used this
and the js-library he uses to highlight.Then I used Seam's Remote API to fire events @ onclick. One needs to do some manual work, but you only need to do it once.
Hope it helps!
-
2. Re: Anyone got an elegant clickable image map solutions
gothmog May 6, 2008 9:43 AM (in response to gothmog)Hi Daniel,
I had a go with this and didn't get very far. :( Any chance of posting your solution or sending to me at troy.tarrant@gmail.com ?
Cheers
Troy
-
3. Re: Anyone got an elegant clickable image map solutions
danielc.roth May 6, 2008 11:08 AM (in response to gothmog)Here are some snippets. I use war deployment and javabeans...
index.xhtml
<s:remote include="map" /> <script type="text/javascript" src="jquery-1.2.3.pack.js"> </script> <script type="text/javascript" src="jquery.maphilight.min.js"> </script> <script> $(function() { $('.map').maphilight(); }); </script> <script type="text/javascript"> //<![CDATA[ function choose(id) { Seam.Component.getInstance("map").choose(id, callback); } function callback(result) { // ... } // ]]> <h:panelGrid style="margin-left: 80px"> <f:verbatim> <img class="map" src="img/map.png" usemap="#myMap" border="0" /> <map id="myMap" name="myMap"> <area onclick="javascript:choose(1);" shape="poly" coords="53,571, 54,573, 56,571, 55,570, 53,571"/> . . . </map> </f:verbatim> </h:panelGrid>
JavaBean Map.java
@Name("map") @Scope(ScopeType.CONVERSATION) @SuppressWarnings("unchecked") public class Map implements Serializable { @WebRemote public void choose(int i) { // Do logic } }
-
4. Re: Anyone got an elegant clickable image map solutions
gothmog May 6, 2008 12:06 PM (in response to gothmog)Thanks Daniel,
You are a legend mate!!
Cheers
Troy