[solved] Pass Arg to Function?

  • Case 1 (without argument) works fine

    Case 2 (with argument) no works

    Please, What is wrong in Case 2?

    Edited once, last by Fernando (May 17, 2024 at 3:25 AM).

  • Fernando May 17, 2024 at 3:17 AM

    Changed the title of the thread from “Help: A very simple JS question.” to “Pass Arg to Function?”.
  • Solved by lastromantik (Thanks very much again!!!!)

    In index.html

    function simpleaction(myArg)
    {
    krpano = document.getElementById('krpanoSWFObject').get('global');
    krpano.call(`localiza_mapa("${myArg}");`);
    }

    ------

    In .xml

    </span><br><br></a></li>
    <span class="ubicar" onclick="simpleaction('c1');">
    Testing<br>
    </span><br><br></a></li>

  • Fernando May 17, 2024 at 7:54 PM

    Changed the title of the thread from “Pass Arg to Function?” to “[solved] Pass Arg to Function?”.

Participate now!

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