I make a form using FAPI, and this form contains a file managed field. I want to show an alert after uploading the file ("uploaded successfully"), and a confirmation ("Are you sure you want to delete file") when deleting the file.
This my code.
$form['my_file_fid'] = array(
'#type' => 'managed_file',
'#title' => t('Files'),
'#default_value' => variable_get('my_file_fid', ''),
'#upload_location' => 'public://',
);
I tried to add #file_value_callbacks, but I don't know how to use it.
I tried to make a javascript just to alert when I click upload,remove button but it doen not work I tried to make it general to all input to check that js is correct now all inputs are clickable but upload and remove button not
jQuery(document).ready(function() {
jQuery('input').bind('click',function() { alert("hi") });
});
I make this js to check jquery ajaxSuccess function