I'm trying to trigger an javascript function when a user select an image for a managed_file field and click on the upload button, not the submit one.Except that in Drupal 7, managed_filr field do not accept ajax argument, I don't have any idea on how to solve my problem. Thanks you in advance.
1 Answer
Finally I found a solution. I decide to use the '#upload_validators' parameter on my form and to declare my own function:
'#upload_validators' => array(
'myOwnFunction' => array(parameters)
),
.
.
.
function myOwnFunction(parameters){
do stuff();
}