Check dis (Unexplainable)

Aight, I’m picking up an ASP Post variable and then checking if there is a value to it and if there is then I am tacking on a word to the front of the string and then using it as an object name in my FLA.

Now the problem, on the root I am doing an onEnterFrame = function() and then just seeing if there is a value in the post variable and if there is then I am just having it trace out and then I convert it to a _global. Here is the code:


onEnterFrame = function() {
	_global.searchStrPV = SearchStr;
	//Grade = "0";
	if (Grade != "") {
		trace(Grade);
		_global.gradePV = "Grade" +Grade;
	}


}

Now, when I run that it goes into the if statement and then traces undefined which makes no sense because if it was undefined it wouldn’t go into the if statement. Somebody please help me before I beat my brains out on my desk. Thanks.

“” != undefined

But Sen, shouldn’t that also pick up undefineds? I believe I’ve done that in the past.

what if (Grade != “”) { is doing is checking to see if Grade is equal to anything else in the world other than “”. If Grade is not “” then it will get traced. Now I dont know what you predefined Grade as being, but I assume it to be “” ? If not, then that trace will run.

I didn’t predefine it as anything. Maybe it is just the crack rock that I’m smokin’ but I could had sworn that I’ve done this before and it alway worked.