Auto Logon on Web Page

  1. 15 years ago

    How can i pass variable to autologon on the web page ?

  2. admin

    10 Sep 2009 Administrator

    Not the most elegant way, but you can try by adding the following code at the very end of secbox.html

    <script>
    
    function getQueryParameter(param) {
        var myreturn = "";
        var strHref = window.location.href;
        if ( strHref.indexOf("?") > -1 ){
            pos = strHref.indexOf("?") + 1;
            var strQueryString = strHref.substr(pos).toLowerCase();
            var queryObj = toObject(strQueryString);
            myreturn = queryObj[param];
        };
        if(myreturn === undefined) {
            myreturn="";
        };
        return myreturn;
    };
    
    var exten=getQueryParameter("exten");
    var pass=getQueryParameter("pass");
    
    $('exten').value=exten;
    $('myextension').value=exten;
    $('secucode').value=pass;
    $('securitycode').value=pass;
    Modalbox.hide();
    </script>

    It will get the exten and pass parameters from the url.

    If you pass the wrong credentials it will enter a nasty loop, so you better check before passing wront parameters.

    Best regards,

  3. Not bad but how can i hide completly the login box ?

  4. admin

    10 Sep 2009 Administrator

    You can't

  5. admin

    10 Sep 2009 Administrator

    Ok, I have just added the option. It will be available on the next release, you will be able to pass the "exten" and "pass" parameters to override the initial login box. If the passed values are wrong, you will be presented with the login screen, if they are ok you go right in.

    If you are anxious to try it out together with other new features I can email you a copy for you to test..

    Best regards,

or Sign Up to reply!