I have a form script:

function gencn ()
{
CN=((form.getValue("fn").substring(0,2).toLowerCas e())+form.getValue("ln").s
ubstring(0,2).toLowerCase());
v = IDVault.globalQuery(null, "QUser", {LOGINID:CN})
if (v[1]!=CN) {
form.alert("login id eksistere, vlg venligst en anden!")
} else {
form.setValues("cn","no match")
}
}
gencn();


Where I want it to excuted the code after the else if the dal query is not
equal to the CN, but I cannot get it to work. If if (v[1]==CN) it is alway
excuting the code after the else and if (v[1]!=CN) it is always excuting the
code before the else

Please help

Regards

Niles Olsen