Rule not firing on click event | Adobe Higher Education
Skip to main content
October 2, 2020
Resuelto

Rule not firing on click event

  • October 2, 2020
  • 1 respuesta
  • 2805 visualizaciones

I'm trying to create a rule where when a user clicks an icon on the page the rule fires. The icon is however within an iframe, and i cannot target the URL. 

Este tema ha sido cerrado para respuestas.
Mejor respuesta de yuhuisg

Any user interaction within an IFRAME usually cannot be detected by the parent frame, which is where your Launch property is. And so Launch will not be able to detect those interactions/events.

If you can add code to the page in the IFRAME, consider using postMessage() in the IFRAME to send the event data up to the parent frame. Then within Launch, you can use window.addEventListener('message', callbackFunction) to handle those events as you wish.

1 respuesta

yuhuisg
Community Advisor
yuhuisgCommunity AdvisorRespuesta
Community Advisor
October 3, 2020

Any user interaction within an IFRAME usually cannot be detected by the parent frame, which is where your Launch property is. And so Launch will not be able to detect those interactions/events.

If you can add code to the page in the IFRAME, consider using postMessage() in the IFRAME to send the event data up to the parent frame. Then within Launch, you can use window.addEventListener('message', callbackFunction) to handle those events as you wish.

October 5, 2020
<iframe id="myIFrame" src="about:blank" width="100%" height="1024"></iframe> where should i use postMessage()?