Creating a custom XBL control in Orbeon for an HTML5 image map

98 Views Asked by At

I have created a custom XBL control which contains an image and a map element (both in xhtml namespace) to define clickable areas. I have been able to link up click events to set a checkbox but this only seems to work for one check/uncheck cycle.

Also, when I place another instance of the XBL on the form, the bound events for each control are not independent. eg clicking an area on one control sets a checkbox on the other!

I am trying to achieve something like this example http://www.outsharked.com/imagemapster/default.aspx?demos.html but using an image to mark the selection instead of shading.

Do you think this would be possible to implement as a custom control in Orbeon?

Alternatively, a method to integrate the above imagemapster jquery plugin would be great too. I have tried but it doesn't seem to initialise correctly.

Thanks in advance, Jake.

2

There are 2 best solutions below

5
On

Yes absolutely, this is possible. There shouldn't be any limitations to what you can do, really. See in particular JavaScript Companion Classes for JavaScript integration. Feel free to post specific questions separately,

0
On

ODK now has a nice implementation, using SVG to replace selects: https://github.com/opendatakit/xforms-spec/issues/108

It'd be great to see something similar out-of-the-box in Orbeon