Retrieving clicked hotspot[name] from XML via JavaScript

  • I can't get this to work properly. My alert message keeps reading out -1 for some reason.

    XML

    JS

    Code
    function modalopen() { 
    var hotspotID = krpano().get('hotspot[get(name)].name');
    alert(hotspotID);
    }


    Any other better (or correct) ways to pull the hotspot name through? *blink* Thanks!

  • Hi, can't you just do:

    Code
    function modalopen(hotspotID) { 
    alert(hotspotID);
    }
  • If I try below, it comes up as undefined


    js

    Code
    function modalopen(hotspotID) { 
    alert(hotspotID);
    }

Participate now!

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