views:

2418

answers:

1

I cant make the shadowbox work...I have a static html page which has an image that acts as a link to open a swf in the shadowbox. however when I click on the image it opens the swf like any other image file in the browser. The Shadow box doesn't seem to work at all.

This is my html page. I am using shadowbox-build-3.0b. Its strange that this editor doesnt allow new users to use image tag in the html code in the editor. So i have changed mine to image.


jQuery(document).ready(function () { Shadowbox.init({ language: "en", players: ["image"] });

});

+1  A: 

Hmm. I have not used shadowbox myself, but if you look at the way how the page suggests you set shadowbox up, there seems to be things that are wrong:

http://www.shadowbox-js.com/options.html#players

As i understand you want swf file to open, when clicking on image.. shouldng you set players: to swf then?

Your code also does not show if your img has link around it and if that link has rel="shadowbox" attribute.

I guess it should be set up something like this:

<script type="text/javascript">
Shadowbox.init({
    language:   "en",
    players:    ["swf"]
});
</script>
<a href="myflashfile.swf" rel="shadowbox"><img alrt="click here to open swf file" src="imgofflash.jpg"/></a>

alan

Zayatzz