View Single Post
  #1038  
Old 05-01-2011, 01:54 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Quote:
Originally Posted by Crow View Post
Don't know if this also happens with v5, but comparing an attribute (this.attr[1]) to -1 results in true when the attribute carries a string (this.attr[1] == -1 -> true when this.attr[1] = "foo", for example). Doing this on the clientside. Didn't give it a try with non-attribute variables. Seemed quite strange to me..
Converting the string to a number will be -1 if it's not a number.
Reply With Quote