Hey guys!
It's me, again
I made switch accounts widget on my forum and it worked perfectly. Than I put it in my homepage message using <iframe> (because I want it there) and now it does nothing when i try to switch account. Do you have any idea why?
These are my codes:
Homepage message
Widget
Thank you in advance for any help you can provide!
I made switch accounts widget on my forum and it worked perfectly. Than I put it in my homepage message using <iframe> (because I want it there) and now it does nothing when i try to switch account. Do you have any idea why?
These are my codes:
Homepage message
- Code:
<iframe style="width: 200px; height: 200px;" src="http://love-you-hogwarts.forumy.biz/h2-switch-account" scrolling="no" frameborder="0"> </iframe>
Widget
- Code:
<div id="accountswitch">
<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.parent.location.reload();
});
});
}
</script>
<div style="margin-top:20px">
<center>
<span class="accountswitchtext">Switch account </span>
</center>
<div class="accountswitchhr">
</div>
<div class="accountswitchbg">
Username:<br /> <input id="switch_uname" type="text" /> <br /> <br /> Password:<br /> <input id="switch_pass" type="password" /> <br /> <br />
<center>
<input type="button" value="Switch" onclick="switch_accounts();" />
</center>
</div>
</div>
</div>
Thank you in advance for any help you can provide!