
March 30th, 2003, 10:01 AM
|
|
Junior Member
|
|
Join Date: Mar 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
checking user input
the fla file is here:URL
this is the part of code im interested in
Code:
function ButtonPressed(buttonInstance) {
//if (buttonInstance == futSubmitBtn) {
if (String(noZeroValue)!=undefined && !isNaN(noZeroValue)) {
trace("1st nozero"+noZeroValue);
// get value of date combobox
fmydate = futDateBox.getSelectedItem().data;
//trace("date: "+fmydate);
// get value of month combobox
fmonth = futMonthBox.getSelectedItem().data;
//trace("month: "+fmonth);
// get value of year box
fyear = futYearBox.getSelectedItem().data;
//trace("year: "+fyear);
apValue = fmydate+fmonth+fyear;
trace("apdate="+apValue);
} else {
feedback = "No values returned, Please re-click submit button.";
return;
}
there seems to be a lag. if i put in a legal date, it will trace "1st noZero" = undefined, if i press it again, i will get what im after. The same goes for illegal dates, i have to press the submit button twice before the feedback msg will kick in, please someone tell me what im doing wrong!!!
|