Site logo

Archived topic

IFrame opened with GPHooks refreshes continuously

1 reply · Started by alw on July 22, 2020

Viewing posts 1–2 of 2

I have reduced my issue to a simple page with just the code:

<iframe onload="this.src = lookfor(this);"></iframe>

and a hook (anywhere):

<script type="text/javascript">
function lookfor(ifrm) {
ifrm.contentWindow.document.write("<html><body>Hello world</body></html>");
}
</script>

It loads "Hello World" as intended -- but then shows a Page Not Found error, then refreshes and repeats continuously.

(I tried adding all sorts of src="" to the iframe, but that doesn't help)

Hi there,

I don't think the issue is related to the hook - does the code work 'correctly' if it is added to the post content ?

This archived topic is closed to new replies.