- 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