Last edited by RinRose7 on January 24th 2021, 5:48 pm; edited 1 time in total
This is a Hitskin.com skin preview
Install the skin • Return to the skin page
This is a Hitskin.com skin preview
Install the skin • Return to the skin page
<script type="text/javascript">
function switch_accounts() {
jQuery.get(document.getElementById('logout').href, function() {
jQuery.post('/login', 'login=1&username='+document.getElementById('switch_uname').value+'&password='+document.getElementById('switch_pass').value, function () {
window.location.reload();
});
});
}
</script>
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();" />
<script type="text/javascript">
var logout = $('#main-user-menu ul:last li a:last').attr('href');
function switch_accounts() {
jQuery.get(logout, function() {
jQuery.post('/login', 'login=1&username='+document.getElementById('switch_uname').value+'&password='+document.getElementById('switch_pass').value, function () {
window.location.reload();
});
});
}
</script>
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();" />
skouliki and SarkZKalie like this post
$(function() {
var logout = $('#main-user-menu ul:last li a:last').attr('href');
function switch_accounts() {
jQuery.get(logout, function() {
jQuery.post('/login', 'login=1&username='+document.getElementById('switch_uname').value+'&password='+document.getElementById('switch_pass').value, function () {
window.location.reload();
});
});
}
});
TonnyKamper likes this post
TonnyKamper likes this post
Yes please, for both of themIf you want I can even send a screen shot of how it looks on my screen with the code in and send a url of my own forum so you can try and click the switch user button.
|
|
skouliki wrote:you are right i just tested it... its change automatically to me also
|
var logout = $('#main-user-menu ul:last li a:last').attr('href');
function switch_accounts() {
jQuery.get(logout, function() {
jQuery.post('/login', 'login=1&username='+document.getElementById('switch_uname').value+'&password='+document.getElementById('switch_pass').value, function () {
window.location.reload();
});
});
}
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();" />
skouliki, TonnyKamper and RinRose7 like this post
<script type="text/javascript">
function switch_accounts() {
jQuery('#main-user-menu li:last a').attr('id','logout');
jQuery.get(document.getElementById('logout').href, function() {
jQuery.post('/login', 'login=1&username='+document.getElementById('switch_uname').value+'&password='+document.getElementById('switch_pass').value, function () {
window.location.reload();
});
});
}
</script> 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();" />
skouliki, TonnyKamper and RinRose7 like this post
Niko and TonnyKamper like this post
Problem solved & topic archived.
|