Welcome Guest [Log In] [Register]
Add Reply
Ajax Username Autocomplete (Very useful); Useful for: PM System, Admin CP and more
Topic Started: Sep 14 2008, 01:59 PM (213 Views)
JakkyD
Member Avatar

Begin typing a username and it will quickly come up with suggestions for it:

I.e.

I type "J" and it will come up with "John, JakkyD, etc etc.". It's quicker for things such as deleting a user on admin cp, or sending a msg, also helps you if you forget all of their name xD

It uses jQuery.

It's a bit of a mess posting because the JS file is compressed.

So heres the DL:

DOWNLOAD





Offline Profile Quote Post Goto Top
 
bustya
Member Avatar
The Master Bitchslapper
Must be an IE user, my FF remembers mine for me. Also, my PM version uses the GET method for the receiver's name and the field is hidden so it can't be changed. I haven't looked at your script but this reminds me, I have a JavaScript fix to stop auto-complete (for FF users). I haven't implemented it yet but plan to for the Captcha field.
Offline Profile Quote Post Goto Top
 
bustya
Member Avatar
The Master Bitchslapper
This turns OFF the autocomplete in FireFox, very useful for the captcha field, or a chat's input.

Code: HTML
 

<script type='text/javascript'>

window.onload = function() {
for(var i = 0, l = document.getElementsByTagName('input').length; i < l; i++) {
if(document.getElementsByTagName('input').item(i).type == 'text') {
document.getElementsByTagName('input').item(i).setAttribute('autocomplete', 'off');
};
};
};

</script>
Edited by bustya, Oct 17 2008, 05:25 AM.
Offline Profile Quote Post Goto Top
 
bustya
Member Avatar
The Master Bitchslapper
Better yet... want to limit the "disable autocomplete" to just one field? Do this:

Wrap your captcha field in a div, give that div an id, let's call it "security"... then instead of
the code above, do this:

Code: HTML
 

<script type='text/javascript'>

window.onload = function() {
for(var i = 0, l = document.getElementById('security').getElementsByTagName('input').length; i < l; i++) {
if(document.getElementById('security').getElementsByTagName('input').item(i).type == 'text') {
document.getElementById('security').getElementsByTagName('input').item(i).setAttribute('autocomplete', 'off');
};
};
};

</script>
Offline Profile Quote Post Goto Top
 
Hayvan

The Download does not work anymore :'(
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Other · Next Topic »
Add Reply