How do you check if the user hasn't made a selection on a combo box?
Just as the title says really! How do you check if the user hasn't made a selection on a combo box? Here's what I've tried, to no avail:
Code:
tShirtBuy.addEventListener(MouseEvent.CLICK, sendShirtToCheckout);
function sendShirtToCheckout (evt:MouseEvent):void {
if (tShirtColour.selectedItem.value == "" || tShirtSize.selectedItem.value == "") {
trace("worked!")
} else {
trace("fail!")
}
}
which gives the error:
Quote:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at indoorshredwebsite_fla::shopmc_17/sendShirtToCheckout()