Read javascript variable from plugin

  • Hi, in a html5 plugin I'm trying to check if a javascript variable is true or false :

    in my xml a button to set the variable to true :

    Code
    onclick="js(set_onlytext)"

    in my html the javascript function:

    Code
    function set_onlytext() {onlytext= true;}

    and in my js plugin two different action if variable is true or false:

    Code
    if (!onlytext) { Do something }
    else if (onlytext) { Do something else}

    looks like from the plugin the variable is always set to false...
    how to do this ?

    Thanx !

Participate now!

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