I use the standalone version of Responsive Filemanager 9 for image-selection on a < input> #image_link.
Where and how the responsive_filemanager_callback function should be used?
I'm trying to get it work as mentioned in the RFM documentation and the code below. This is needed to update the src attribute of the < img> #image_preview after selecting an image in RFM9.
This is my code:
<input id="image_link" name="link" type="text" value="">
<a class="btn iframe-btn" type="button" href="<?=FILEMANAGER_PATH;?>/dialog.php?type=1&field_id=image_link">Select</a>
<img id="image_preview" src="" />;
<script>
$('.iframe-btn').fancybox({
'width' : 900,
'height' : 600,
'type' : 'iframe',
'autoScale' : false
});
$('#image_link').on('change',function(){
alert('change triggered');
});
function responsive_filemanager_callback(field_id){
console.log(field_id);
var url=jQuery('#'+field_id).val();
alert('update '+field_id+" with "+url);
//your code
}
</script>
The $('#image_link')on.('change') function doesn't recognize the changes by RFM.
Thanks for your inputs!