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
/
AimDisplayName.js
< prev
next >
Wrap
Text File
|
2006-01-06
|
1KB
|
43 lines
var gscreenName;
function AimDisplayNameOnLoad()
{
doSetOKCancel(onOKAimDisplayName, onCancel);
gscreenName = window.arguments[0];
document.getElementById("screenname").setAttribute("value",gscreenName);
var curDispName = aimFeedbagManager().GetDispName(gscreenName);
if (curDispName && curDispName != "")
document.getElementById("fldnewdispname").setAttribute("value",curDispName);
document.getElementById("fldnewdispname").focus();
}
function dnKeyPress(event)
{
if (event.keyCode == 13) {
//enter key is pressed. ok the window. onOK will take care of validations
onOKAimDisplayName();
}
}
function onOKAimDisplayName()
{
var newdispname = document.getElementById("fldnewdispname").value;
newdispname = newdispname.replace(/^\s+|\s+$/g, "");
if (!newdispname || newdispname == "") {
aimErrorBox(aimString("msg.BadDispName"));
return;
}
aimFeedbagManager().SetDispName(gscreenName, newdispname);
window.close();
}
function onCancel()
{
window.close();
}