views:

434

answers:

1

In my XUL I have the following code fragments:

<map name="KeypadMap">
<area href="javascript:pad('A')" coords="1,1,31,31" shape="rect"/>
</map>
...
<hbox flex="1">
 <image src="./keypad.png" width="32" height="32" useMap="#KeypadMap"/>
</hbox>

The image displays just fine, however, when I mouse over, the cursor does not change to a hand, and clicking does not call the pad function.

Similar code works fine in straight HTML, so there must be some trick to get it working via a Firefox XUL file.

A: 

You'll have to use a namespace to embed HTML inside of XUL. Check this guide.

Zach
<html:map name="KeypadMap"><html:area href="javascript:pad('A')" coords="1,1,31,31" shape="rect"/></html:map>... <html:img src="./keypad.png" width="32" height="32" usemap="#KeypadMap"/>this gives me the image which shows up as an expected <img> with properties, but usemap still doe
Noah
but usemap still does not work.
Noah
Also requires using id instead of name <map id="KeypadMap">
Noah