views:

49

answers:

1

in action script

str is string var

str=(some condition)?" store true":"store false";

when i alert the str am not getting any message .....why am not getting

code:

[Bindable]
public var errVarMsg:String ;

errVarMsg="";
errVarMsg=(minfee<=maxfee)?"":"fee min > max\n";
Alert.show(errVarMsg);
A: 

If minfee is less than or equal to maxfee, you'll get an empty alert which might be taken as no message. Change it to

minfee = 5;
maxfee = 10;
errVarMsg = (minfee <= maxfee) ? "min <= max" : "min > max";
Alert.show(errVarMsg);

minfee = 15;
maxfee = 10;
errVarMsg = (minfee <= maxfee) ? "min <= max" : "min > max";
Alert.show(errVarMsg);
Amarghosh
when the condition is true i need errVarMsg to be empty....only if it's false i will alert...
dpaksp
Did you try this - did you get proper output as expected?
Amarghosh
`Alert.show` will run even if your string is empty.
Amarghosh