Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to I use javascript document.addEventListener in amx page

2924339Jun 16 2015 — edited Jun 21 2015

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.

Comments
Post Details
Added on Jun 16 2015
1 comment
875 views