Hello,
i have this line in a javascript:
xmlhttp.open(“GET”,“<?=$this->Url->build(['prefix'=>false,'controller'=>'Terms','action'=>'searchterm?q='])?>”+str,true);
This works if I put the Javascript directly in the Header of the layout.
If i save the script in an external file in folder “webfoot/js” and fetch the script in my layout with
<?= $this->HTML->script(['scripts']) ?> <?= $this->fetch('script') ?>
I get this reponse in the console of firefox:
<Controller could not be found.
> GET
> http://localhost/term1/customer/admin/%3C?=$this->Url->build(['prefix'=>false,'controller'=>'Terms','action'=>'searchterm?q='])?>t
Where does the additional “<” come from?