The use of Shadowbox with Image maps

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The use of Shadowbox with Image maps

Falcon3
I am trying to get shadow box to display the image linked from this image map. Is there something wrong with this code?

My Script:

<script type="text/javascript" src="../scripts/adapter/shadowbox-base.js"></script><script type="text/javascript" src="../scripts/shadowbox.js"></script><script type="text/javascript"> Shadowbox.loadSkin('classic', '../scripts/skin'); Shadowbox.loadLanguage('en', '../scripts/lang'); Shadowbox.loadPlayer(['flv', 'html', 'iframe', 'img', 'qt', 'swf', 'wmp'], '../scripts/player'); window.onload = function(){ Shadowbox.init(); }; </script> 

My html:

      <br />
<img src="../images/bridge.jpg" alt="Bridge" width="776" height="500" border="0" usemap="Bridge" /><br />
<map name="Bridge" id="Bridge"><br />
<area shape="rect" coords="538,439,639,466" href="../images/bridge.jpg" alt="Play" /><br />
</map>"

The breaks are there just for this post.

Also does shadowbox support .pdf files.?

Thanks,

Fred
Reply | Threaded
Open this post in threaded view
|

Re: The use of Shadowbox with Image maps

Wizzud
You need to use Shadowbox.setup() with AREA tags because they don't support the rel attribute, eg...

Shadowbox.setup(document.getElementById('anIdContainingTheMap?').getElementsByTagName('area'));

You can configure the Shadowbox to handle PDFs, but the results are unpredictable cross-browser, because there is no reliable way to determine whether or not a browser has PDF support as a plugin or if it will simply activate the download of the PDF. Hence, PDFs are not currently 'supported' by default.
Combine literacy with curiosity and a whole world of information opens up to you