home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2006 December
/
PCWorld_2006-12_cd.bin
/
komunikace
/
netscape
/
nsb-install-8-1-2.exe
/
chrome
/
aim.jar
/
content
/
aim
/
AimAutoComplete.js
< prev
next >
Wrap
Text File
|
2006-01-06
|
1KB
|
36 lines
var IMServiceClass = Components.classes['@netscape.com/aim/IMManager;1'];
var pIIMManager = IMServiceClass.getService(Components.interfaces.nsIIMManager);
var AddressAutoCompleteListener = {
onAutoCompleteResult: function(field, aOriginalString, aMatch) {
//dump("textId = " + doc_id + "\n");
//dump("value = " + field.value + "\n");
//dump("aOriginalString = " + aOriginalString + "\n");
//dump("aMatch = " + aMatch + "\n");
if(field)
field.value = aMatch;
}
};
function aimAutoCompleteObject()
{
var pIIMManager = aimManager();
if(pIIMManager)
return pIIMManager.QueryInterface(Components.interfaces.nsIAutoCompleteSession);
else
return null;
}
function aimAutoCompleteAddress(select_doc_id, doc_id)
{
dump("select_doc_id = " + select_doc_id + "\n");
dump("doc_id = " + doc_id + "\n");
var ac = aimAutoCompleteObject();
var field = document.getElementById(doc_id);
dump("field " + field + "ac " + ac + "\n");
if(ac)
ac.autoComplete(null, field, field.value, AddressAutoCompleteListener);
}