In the element $('input.filename').bind('change', function(){...}) there is a text element with a change event, and a pop-up window appears that fires this event using $('input.filename').trigger('onchange')|.change() .
Exception: if the change event is associated with the launch of the "onchange" attribute!
The attachment code looks like:
input.change(function () { var dims = { 'width': settings.previewWidth, 'height': settings.previewHeight }; updateImagePreview(input, preview, dims); });
The startup code looks like this:
var input = $("input[name='any_name']", window.opener.document); input .val("<?=$choice ?>") .trigger("onchange"); window.close();
source share