I have some problem for document.addEventListener in amx page.
I try to use it to register Event to the MAF on amx page.
If I do this:
<amx:verbatim id="v1"><![CDATA[
document.addEventListener('showpagecomplete', loaded, false);
]]></amx:verbatim>
is work fine and like my expected.But it will print the "document.addEventListener('showpagecomplete', loaded, false);" on screen.
So I try to use <script></script> tag to around it:
<amx:verbatim id="v1"><![CDATA[
<script>
document.addEventListener('showpagecomplete', loaded, false);
</script>
]]></amx:verbatim>
and it not work. I not sure what's going on here.
Is any one help for this? Just need how to use document.addEventListener in amx. If has the sample code will be lovely. Thanks for every advice.