Hello everyone,

I have a form in an application that when it is edited, I want to send
the information back to the server to be updated in the database. I am
using focusOut to trigger the event at each text input field such as this

<mx:TextInput id="first_name" change="validateForm(event)"
focusOut="updateUserFormField(event)"/>

The function I have writted to do the update is as follows

private function updateUserFormField(event:Event):void {
if (formType == "update"){
fieldName = event.target.parent.id;
fieldValue = event.target.parent.text;
        Alert.show('Name = ' + fieldName);
        Alert.show('Value = ' + fieldValue);
        updateUserForm.send();
}
}

I put the alert's in for debugging to make sure I was extracting the
correct information to send in an httprequest call.

The question I have is why are both alert's displaying twice? This
function is somehow being called multiple times when I exit a field.
Does anyone have any insight into this?

Thanks in advance

Don

Reply via email to