Search code examples
javascriptdeepzoomseadragon

Seadragon deepzoom placement of files


I have created a deepzoom image, and when image files is placed locally I can display it with this code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head>
    <style type="text/css">
        body {
            margin: 0px;
            font-family: Verdana;
            line-height: 1.25em;
        background-color:#000000; 
        }

    </style>

    <script type="text/javascript" src="http://seadragon.com/ajax/0.8/seadragon-min.js"></script>
    <script type="text/javascript">
        var viewer;

        function init() {
            viewer = new Seadragon.Viewer("container");
            viewer.openDzi("spider.xml");
        viewer.setFullPage(true);
        }

        Seadragon.Utils.addEvent(window, "load", init);
    </script>
</head>

<body>
<div id="content">

    <div id="container">
    </div>


</div>
</body>

</html>

But when I then uploaded the images and the xml file to http://foto.qaz.dk

and changed the following code viewer.openDzi("spider.xml"); to viewer.openDzi("http://foto.qaz.dk/spider.xml");

I get an error message from seadragon "Hmm, this doesnt appear to a valied deep zoom image"

What am I doing wrong?


Solution

  • See this post:

    http://dragonosticism.wordpress.com/2008/11/25/seadragon-ajax-and-cross-site-scripting/

    You have hit a cross-scripting javascript problem thingy. You will need to move your script onto the remote host or think again.