donaldparkerii
05-24-2006, 11:03 PM
Here is my code everything works perfect with the excption if i add
group_cmb.onKillFocus = validateGroup; or for anyother combobox
, when you kill the focus and start typing in a Text Input the combo box will scroll to which ever letter you typed (if is has that value). any ideas?
function validateName():Void{
if (name_txt.length == 0) {
nameValidate_txt.text = "PLEASE ENTER YOUR NAME";
field1 = false;
} else if (name_txt.length>0) {
nameValidate_txt.text = "";
field1 = true;
}
}
function validateID():Void{
if (empID_txt.length == 0) {
idValidate_txt.text = "PLEASE ENTER YOUR EMPLOYEE ID";
} else if (empID_txt.length>0) {
idValidate_txt.text = "";
}
}
function validateGroup():Void{
if (group_cmb.selectedIndex == 0) {
groupValidate_txt.text = "PLEASE SELECT YOUR GROUP";
} else if (group_cmb.selectedIndex>0) {
groupValidate_txt.text = "";
}
}
function validateDepo():Void{
if (department_cmb.selectedIndex == 0) {
depoValidate_txt.text = "PLEASE SELECT YOUR DEPARTMENT";
} else if (department_cmb.selectedIndex>0) {
depoValidate_txt.text = "";
}
}
function submit():Void{
validateName();
validateID();
validateGroup();
validateDepo();
Name = name_txt.text;
Employee_ID = empID_txt.text;
Group = group_cmb.text;
Department = department_cmb.text;
Training_Type = type_txt.text;
}
name_txt.onKillFocus = validateName;
empID_txt.onKillFocus = validateID;
submit_btn.onRelease = submit;
group_cmb.onKillFocus = validateGroup; or for anyother combobox
, when you kill the focus and start typing in a Text Input the combo box will scroll to which ever letter you typed (if is has that value). any ideas?
function validateName():Void{
if (name_txt.length == 0) {
nameValidate_txt.text = "PLEASE ENTER YOUR NAME";
field1 = false;
} else if (name_txt.length>0) {
nameValidate_txt.text = "";
field1 = true;
}
}
function validateID():Void{
if (empID_txt.length == 0) {
idValidate_txt.text = "PLEASE ENTER YOUR EMPLOYEE ID";
} else if (empID_txt.length>0) {
idValidate_txt.text = "";
}
}
function validateGroup():Void{
if (group_cmb.selectedIndex == 0) {
groupValidate_txt.text = "PLEASE SELECT YOUR GROUP";
} else if (group_cmb.selectedIndex>0) {
groupValidate_txt.text = "";
}
}
function validateDepo():Void{
if (department_cmb.selectedIndex == 0) {
depoValidate_txt.text = "PLEASE SELECT YOUR DEPARTMENT";
} else if (department_cmb.selectedIndex>0) {
depoValidate_txt.text = "";
}
}
function submit():Void{
validateName();
validateID();
validateGroup();
validateDepo();
Name = name_txt.text;
Employee_ID = empID_txt.text;
Group = group_cmb.text;
Department = department_cmb.text;
Training_Type = type_txt.text;
}
name_txt.onKillFocus = validateName;
empID_txt.onKillFocus = validateID;
submit_btn.onRelease = submit;