# Inline Frame blocking external URL

**URL:** <https://forum.inductiveautomation.com/t/inline-frame-blocking-external-url/93274>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting\
**Created:** [July 16, 2024, 9:18am UTC](https://forum.inductiveautomation.com/t/inline-frame-blocking-external-url/93274 "2024-07-16T09:18:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jorge.galvez](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jorge.galvez](https://forum.inductiveautomation.com/u/jorge.galvez)\
**Post date:** [July 16, 2024, 9:18am UTC](https://forum.inductiveautomation.com/t/inline-frame-blocking-external-url/93274/1 "2024-07-16T09:18:13Z")

</div>

Hi! I'm working on a Perspective weather page data and I'm using the Inline Frame component to get weather data from an external URL. Unfortunately for me, the external site has links to another pages and I don't want the user to be capable of clicking and navigate to the sites referenced by the page at the inline frame. Is it possible to block the navigation or the click action over the Inline Frame component so it never redirects to another URL?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [July 16, 2024, 9:30am UTC](https://forum.inductiveautomation.com/t/inline-frame-blocking-external-url/93274/2 "2024-07-16T09:30:55Z")

</div>

Blocking the navigation specifically might be able to get blocked with some js...

Just preventing any user input is quite easy with css, it will disable all user click though.  
You can add a style `pointer-events:none`.

If that is acceptable use that,  
Else you will have to create an iframe with a markdown component and use the sandbox atribute and allow everything exept navigation. I know it exists, but i have never used it.

> **[W3Schools.com](https://www.w3schools.com/tags/att_iframe_sandbox.asp)**
>
> W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

---

<div class="post-metadata">

**Author:** ![jorge.galvez](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jorge.galvez](https://forum.inductiveautomation.com/u/jorge.galvez)\
**Post date:** [July 16, 2024, 9:43am UTC](https://forum.inductiveautomation.com/t/inline-frame-blocking-external-url/93274/3 "2024-07-16T09:43:53Z")

</div>

Hi @victordcq it worked with the style prop. Thank you!

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [July 16, 2024, 10:21am UTC](https://forum.inductiveautomation.com/t/inline-frame-blocking-external-url/93274/4 "2024-07-16T10:21:17Z")

</div>

Do note that this isnt a secure way to prevent clicks, so dont use it as a security measure

---

<div class="post-metadata">

**Author:** ![jorge.galvez](https://avatars.discourse-cdn.com/v4/letter/j/ecb155/32.png) [@jorge.galvez](https://forum.inductiveautomation.com/u/jorge.galvez)\
**Post date:** [July 16, 2024, 2:03pm UTC](https://forum.inductiveautomation.com/t/inline-frame-blocking-external-url/93274/5 "2024-07-16T14:03:15Z")

</div>

> [@victordcq](#):
>
> o dont use it as a security measure

Ok. In this case, this is just to avoid navigation to the main page of the weather site.

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [July 16, 2024, 2:06pm UTC](https://forum.inductiveautomation.com/t/inline-frame-blocking-external-url/93274/6 "2024-07-16T14:06:56Z")

</div>

Yes i know thats why i suggested it:p Its fine for here, but dont start using pointer-events to disable admin only buttons or something. just giving a general warning for this css property
