I have fancybox installed on my website and I am getting some strange behaviour. If i refresh the page and press a picture as the page loads fancybox will popup and work. Once the page finishes loading and then i press the picture again it says “The requested content cannot be loaded. Please try again later.”
Why would it do that? It already let me view the picture once but after the page completely fishes loading it cannot find the picture? I can press the picture as the page is loading and then close it, then open it again without any problems. I can do that as long as that page hasnt finished loading.
UPDATE
This is in attachment.html:
<a class="various" href="#inline">
<img src="{_file.F_FILE_THUMB_IMAGE}" alt="{_file.DOWNLOAD_NAME}" width="400px" />
</a>
<div id="inline" style="display:none;">
<div id="mediaplayer" style="padding:10px;"></div>
</div>
<script type="text/javascript">
// <![CDATA[
jwplayer("mediaplayer").setup({
'flashplayer':'/test/player/player.swf',
'file':'{_file.F_FILE}',
'image':'{_file.F_FILE_THUMB_IMAGE}',
'volume':'25',
'provider':'video',
'width': '640',
'height': '480'
});
// ]]>
</script>
This is from the overall_header.html
<link rel="stylesheet" href="/test/js/fancybox/jquery.fancybox.css?v=2.0.4" type="text/css" media="screen" />
<script type="text/javascript" src="/test/js/fancybox/jquery.fancybox.pack.js?v=2.0.4"></script>
<script type="text/javascript">
// <![CDATA[
$(document).ready(function() {
$(".various").fancybox({
fitToView: true,
width: '75%',
height: '75%',
autoSize: true,
closeClick: false,
closeBtn: 'true',
scrolling: 'no',
padding: '5',
});
});
// ]]>
</script>
<script type="text/javascript" src="/test/player/jwplayer.js"></script>
Just to update this it was simply another script that was causing the fancybox to fail. I disabled all other scripts and it worked fine. I then enabled each script one by one to find the one causing the problems. So it’s all good now, thanks for the help.