Operators "if +1 or -1 but not undefined"

Hey guys,

Im trying to put an if statement together that executes “if +1 or -1 but not undefined”.

Basically if an earlier specified var, is greater in value or less then before. Im building a destop ap that draws these vars in from the web, and the problem is, when I use <>, > works fine …but if I use < …then my if statement executes if the vars are returned as undefined (eg if the server times out or net connection drops).

How would you guys go about putting this statement?

Phew…this has been a little difficult to explain, if anyone confused or needs anymore info please ask :smiley:

Zaid

Is there no one that would even hazard a guess??

you mean something like this?

[AS]
if ((someVar == -1 || someVar == 1) && someVar != undefined) {
// do stuff
}[/AS]