Help with 'Switch Characters' Widget
5 posters
Page 1 of 1
Help with 'Switch Characters' Widget
I recently installed on my site the widget where you can "Switch Characters" easily. This is the code:
It works it's not a problem on it not working, it's just that after you've entered your username and password and you click the "Enter" key on your keyboard, it doesn't work like that, you need to move your mouse to click "Switch Accounts" and I was wondering if there was a way to allow clicking "Enter" key could work.
- 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>
<hr />
<center>
<input id="switch_uname" type="text" /><br />
<input id="switch_pass" type="password" /><br />
<input type="button" value="Switch Accounts" onclick="switch_accounts();" /></center>
It works it's not a problem on it not working, it's just that after you've entered your username and password and you click the "Enter" key on your keyboard, it doesn't work like that, you need to move your mouse to click "Switch Accounts" and I was wondering if there was a way to allow clicking "Enter" key could work.
Re: Help with 'Switch Characters' Widget
Please don't double/triple post. Your post need to be separated by 24 hours before bumping, replying or adding more information. Please use the edit button instead! |
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Help with 'Switch Characters' Widget
link to your form page where it is so i can see/try it?
Have you tried on any other browsers as well?
Have you tried on any other browsers as well?
kirk- Forumaster
- Posts : 11037
Reputation : 653
Language : English,Vulcan,Klingon, Romulan,& Gorn
Re: Help with 'Switch Characters' Widget
http://hogwartsrestored.forumotion.com/
on the left.
Also, it'd be cool if there was a way to like when you type the first letter, a box appears to "suggest" recently typed usernames to make it faster
on the left.
Also, it'd be cool if there was a way to like when you type the first letter, a box appears to "suggest" recently typed usernames to make it faster
Re: Help with 'Switch Characters' Widget
I don't know about the enter thing, but to get the usernames to be suggested change both appearances of 'switch_uname' to 'username' and that should do it.
Also, is this code freely available somewhere or is it something you wrote? Would love to be able to have something like this on our site.
Also, is this code freely available somewhere or is it something you wrote? Would love to be able to have something like this on our site.
MissTiquelle- New Member
- Posts : 3
Reputation : 0
Language : English
Re: Help with 'Switch Characters' Widget
Hi,
Try using this instead:
Try using this instead:
- 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>
Switch Accounts<hr />
<input id="switch_uname" type="text" /><br />
<input id="switch_pass" type="password" /><br />
<input type="button" value="Switch Accounts" onclick="switch_accounts();" />
Sir Chivas™- Helper
- Posts : 6965
Reputation : 457
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||
Similar topics
» Log-In/ Account-Switch Widget
» Switch Account Widget
» Switch
» Account Switch (Widget) Issue
» Site Switch Over
» Switch Account Widget
» Switch
» Account Switch (Widget) Issue
» Site Switch Over
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum