Javascript acces from krpano

  • Hi,
    I want to set a variable of a javascript file from the xml file when i click on a hotspot.

    But i dont know how to do this *sad*

    Edit :
    Here is a part of my code :

  • Hi,

    write a custom Javascript function at global scope that will do what you need (like setting some custom Javascript variables) and then call this function by using the js() action and pass the settings you want to set to it.

    E.g. to pass the current hlookat/vlookat values:

    xml:

    Code
    onclick="js( yourfunction(get(view.hlookat), get(view.vlookat)) );"

    js:

    Code
    function yourfunction(hlookat, vlookat)
    {
     alert("hlookat="+hlookat+" vlookat="+vlookat);
    }

    Best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!