I have a form script:

function gencn ()
CN=((form.getValue("fn").substring(0,2).toLowerCas e())+form.getValue("ln").s
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")

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


Niles Olsen