Answer the question
In order to leave comments, you need to log in
How to write php code in JS section?
<?php
$script = <<< JS
$('button.submitButton').click(function(){
myDropzone.processQueue();
});
var mockFile = { name: "Filename", size: 12345 };
myDropzone.options.addedfile.call(myDropzone, mockFile);
myDropzone.options. thumbnail.call(myDropzone, mockFile, "/admin/images/articles/1/e1b3f817204434.5603bb143a908.jpg");
JS;
$this->registerJs($script);
?>
myDropzone.options.addedfile.call(myDropzone, mockFile);
myDropzone.options. thumbnail.call(myDropzone, mockFile, "/admin/images/articles/1/e1b3f817204434.5603bb143a908.jpg");
Answer the question
In order to leave comments, you need to log in
<?php
$script = <<< JS
$('button.submitButton').click(function(){
myDropzone.processQueue();
});
var mockFile = { name: "Filename", size: 12345 };
JS;
foreach($array as $v){
$script.='myDropzone.options.addedfile.call(myDropzone, mockFile);
myDropzone.options. thumbnail.call(myDropzone, mockFile, "/admin/images/articles/1/e1b3f817204434.5603bb143a908.jpg");';
}
$this->registerJs($script);
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question