0
I need to insert value width and height through a php variable.
window.addEventListener('DOMContentLoaded', function () {
var image = document.querySelector('#image');
var cropper = new Cropper(image, {
ready: function () {
this.cropper.setCropBoxData({
"left":750,
"top":190,
"width":500,
"height":50
});
},
});
Where :
"width":100,
"height":50
Would be for example:
"width": $VALOR,
"height":$VALOR2
But that way it doesn’t work,
Thank you in advance!
PHP <-> HTML, HTML <-> JS, JS x-x PHP !
– rbz
https://answall.com/questions/51392/ler-os-dados-do-php-no-javascript
– rbz