The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.

Create a free forum like this one.

Log-In/ Account-Switch Widget

Go down

Log-In/ Account-Switch Widget

Post by Bones! on December 7th 2014, 2:58 am

I've been searching for this code for a long time. I know people have it, and everything I do to recreate it... failed. Basically it's a widget that has two sections to fill in info. The first being a username, and the second the password. This allows people to switch from one account to the other.

Can someone please help?

Posts : 169
Reputation : 20
Language : English, CCS, HTML
Location : Behind you

Back to top Go down

Re: Log-In/ Account-Switch Widget

Post by Tonight on December 7th 2014, 3:10 am

    <script type="text/javascript">
        function switch_accounts() {
        jQuery.get(document.getElementById('logout').href, function() {'/login', 'login=1&username='+document.getElementById('switch_uname').value+'&password='+document.getElementById('switch_pass').value, function () {
        Switch user:<hr />
        <input id="switch_uname" type="text" /><br />
        <input id="switch_pass" type="password" /><br />
        <input type="button" value="Switch user" onclick="switch_accounts();" />

Male Posts : 259
Reputation : 69
Language : Estonian, English, Russian
Location : Estonia

Back to top Go down

Back to top

Permissions in this forum:
You cannot reply to topics in this forum