js(); return value needed

  • For a Social Media Share-Button i'd like to get a value back from a Java Script funktion called getlink().

    JS:

    <script>
    function getlink() {
    var scene = krpano.get("xml.scene");
    var ath = krpano.get("view.hlookat").toFixed(2);
    var atv = krpano.get("view.vlookat").toFixed(2);
    var fov = krpano.get("view.fov").toFixed(2);
    var link = "?scene=" + scene + "&?ath=" + ath + "&?atv=" + atv + "&?fov=" + fov;
    link = window.location.protocol + "//" + window.location.hostname + window.location.port + window.location.pathname + link;
    return link;
    }
    </script>


    XML:

    <layer name="facebook" url="../skin/fb.png" scale="1" x="0" y="0" onclick="openurl('https://www.facebook.com/sharer/sharer.php?u=' + js(getlink()),_blank);" />

    How can i get the value into the onclick-event???
    *confused*

Jetzt mitmachen!

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