So I'm using this script for a switch-user widget I have in my header, always displayed right below my forum's logo.
Something in that function is making it so that the login only works on my forum's home page. When I click the "switch user" button on any other page, nothing happens.
Can someone who knows this code please tell me how to tweak it so the login works on every page?
Here's my forum:
illustrare.forumotion.com
- Code:
<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>
Something in that function is making it so that the login only works on my forum's home page. When I click the "switch user" button on any other page, nothing happens.
Can someone who knows this code please tell me how to tweak it so the login works on every page?
Here's my forum:
illustrare.forumotion.com