HI,
Can someone explain this line of code
var c = document.mutate[lastFileCtrl];
It’s part of the SetUrl function and it should update the content of a text field. In my case c is undefined and the value is not updated and can’t find out why.
Here’s the full function:
function SetUrl(url, width, height, alt){
if(lastFileCtrl) {
console.log(url);
console.log(lastFileCtrl);
var c = document.mutate[lastFileCtrl];
console.log(c);
if(c) c.value = url;
lastFileCtrl = '';
} else if(lastImageCtrl) {
var c = document.mutate[lastImageCtrl];
if(c) c.value = url;
lastImageCtrl = '';
} else {
return;
}
}
For some unknown reason console.log(c); is undefined.
Thanks