call xml action from js by clicking on html button

  • Hi all !

    I'm learning the JS interface.

    Today, i would like to run a xml action from a JS file by clicking on a HTML button

    I have my index.html

    <script src="script.js"></script>
    <div id="title"></div>
    <div class="button" onclick=" getSceneTitleName(); ">Get Scene Title Name</div>

    On my script.js

    function getSceneTitleName(){
    	krpano.set("scene[get(xml.scene)].title","Nouveau titre");
    	<!-- Here i would like to call the skin_update_scene_infos action of the /skin/vtourskin.xml -->
    	var title=  krpano.get("scene[get(xml.scene)].title");
    	document.getElementById("title").innerHTML = title ; 

    and my /skin/vtourskin.xml

    <action name="skin_update_scene_infos" scope="local">
    	...the actions...

    I tried"skin_update_scene_infos()") but doesn't seems to work in my case...
    I think the answer should be here : bu i can't figure it out....

    Thank you all

    Cheers from france,


Participate now!

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