Embedding Code / Widget

  • Unknown's avatar

    I am trying to embed script for a widget so users can log into an online banking platform. Is this possible?

    Here’s the code:
    <script>
    function enableMe() {
    document.getElementById(‘dscheck’).value=’0′;
    }
    function isCookieEnabled() {
    var exp = new Date();
    exp.setTime(exp.getTime() + 1800000);
    setCookie(‘testCookie’, ‘cookie’, exp, false, false, false);
    if (document.cookie.indexOf(‘testCookie’) == -1) {
    return false;
    }
    exp = new Date();
    exp.setTime(exp.getTime() – 1800000);
    setCookie(‘testCookie’, ‘cookie’, exp, false, false, false);
    return true;
    }
    function setCookie(name, value, expires, path, domain, secure) {
    var curCookie = name + ‘=’ + value +
    ((expires) ? ‘; expires=’ + expires.toGMTString() : ”) +
    ((path) ? ‘; path=’ + path : ”) +
    ((domain) ? ‘; domain=’ + domain : ”) +
    ((secure) ? ‘; secure’ : ”);
    document.cookie = curCookie;
    }
    function isDupSubmit() {
    var dupSbmt = true;
    var e = document.getElementById(‘dscheck’);
    if (e != null && e.value == ‘0’) {
    dupSbmt = false;
    e.value = ‘1’;
    setTimeout(enableMe, 5000);
    }
    return dupSbmt;
    }
    function setParamStatus() {
    if (!isDupSubmit()) {
    if (isCookieEnabled()) {
    document.getElementById(‘testcookie’).value = ‘true’;
    }
    document.getElementById(‘testjs’).value = ‘true’;
    return true;
    }
    return false;
    }
    </script>
    </head>
    <body>
    <form id=’loginForm’ autocomplete=’off’ method=’post’
    action=’https://www.rcssehb.org/tob/live/usp-core/app/login/consumer’
    onsubmit=’return setParamStatus();’>

    <label for=’userid’>Username</label>
    <input type=’text’ autocomplete=’off’ value=” id=’userid’ name=’userid’/>
    <label for=’password’>Password</label>
    <input type=’password’ value=” id=’password’ name=’password’/>
    <input type=’submit’ id=’submitBtn’ />
    <input type=’hidden’ id=’testcookie’ name=’testcookie’ value=’false’/>
    <input type=’hidden’ id=’testjs’ name=’testjs’ value=’false’/>
    <input type=’hidden’ id=’dscheck’ name=’dscheck’ value=’0’/>
    </form>

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Yes, it worked when I tried it on my site. You will just go to your widget section and add a text widget to your sidebar or footer. Then paste that code into the box and save it.

  • The topic ‘Embedding Code / Widget’ is closed to new replies.