How to use the js file(embedded the xml file from protect tool)?

  • Hello Everyone:
    I generated a js file embedded xml file in it with protect tool. now I don't know how to use it in html, it always show 'test.js - loading or parsing failed '.


    there is the code in html:

    Code
    var viewer = createPanoViewer({swf:"krpano.swf", xml:"test.js", target:"panocontent"});


    Thanks.

  • Hi! I thought that html has a special place for the .js file. See here:

    Code
    <script src="tour.js"></script>
    
    
    <div id="pano" style="width:100%;height:100%;">
    	<noscript><table style="width:100%;height:100%;"><tr style="valign:middle;"><td><div style="text-align:center;">ERROR:<br/><br/>Javascript not activated<br/><br/></div></td></tr></table></noscript>
    	<script>
    		embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano", html5:"auto", passQueryParameters:true});
    	</script>
    </div>

    Maybe, place your .js where it should be (see where 'tour.js' is in the above example) and not try to hammer it in the place of .xml?

    I've never tried embedding xmls into .js, however, so this is a guess only...

    Regards,

    Alexey

  • Hi! I thought that html has a special place for the .js file. See here:

    Maybe, place your .js where it should be (see where 'tour.js' is in the above example) and not try to hammer it in the place of .xml?

    I've never tried embedding xmls into .js, however, so this is a guess only...

    Thank for your help. I tried, but it still says 'main.xml - loading or parsing failed '...

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!