# Web browser zoom

**URL:** <https://forum.inductiveautomation.com/t/web-browser-zoom/10494>\
**Category:** Ignition\
**Created:** [September 22, 2015, 9:46am UTC](https://forum.inductiveautomation.com/t/web-browser-zoom/10494 "2015-09-22T09:46:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanko25](https://avatars.discourse-cdn.com/v4/letter/v/a87d85/32.png) [@vanko25](https://forum.inductiveautomation.com/u/vanko25)\
**Post date:** [September 22, 2015, 9:46am UTC](https://forum.inductiveautomation.com/t/web-browser-zoom/10494/1 "2015-09-22T09:46:39Z")

</div>

Hello guys!

I just started using Ignition last week and I have an issue now. I have to use the Web browser to display a page which is being stored on company server. It is fine displaying the page on a big screen with resolution from 1650x1050 and over but when I try to display it on a small laptop screen with resolution 1366x768 it only resizes horizontally and I am ending up with a scroll bar on the side. I found a way to resize it properly using the “Zoom level” property of the Web browser. So my question is it possible to get Ignition to change the “Zoom level” based on screen’s resolution using scripting? If yes could you give me a hint how to do it? Thank you in advance!

---

<div class="post-metadata">

**Author:** ![acooper](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/acooper/32/4221_2.png) [@acooper](https://forum.inductiveautomation.com/u/acooper)\
**Post date:** [October 12, 2015, 3:29pm UTC](https://forum.inductiveautomation.com/t/web-browser-zoom/10494/2 "2015-10-12T15:29:12Z")

</div>

Hi,

This is definitely possible! You will need to create a script on the window itself (not the root container, but one level up). You’ll want to put the script on the ‘internalFrameActivated’ event handler, and your script should look something like the following:

```auto
if event.source.size.width <= 1600:
	event.source.rootContainer.getComponent('Web Browser').zoomLevel = 2
```

---

<div class="post-metadata">

**Author:** ![alexm](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@alexm](https://forum.inductiveautomation.com/u/alexm)\
**Post date:** [November 27, 2020, 10:58am UTC](https://forum.inductiveautomation.com/t/web-browser-zoom/10494/3 "2020-11-27T10:58:37Z")

</div>

Could this be used as a script on a button that displays a pop up?

I’m having the same issue currently on a project in perspective that scada is being displayed on a pc screen with 1080 resolution and an hmi of 1024.

That toggle button has set as an event to display a pop up in the middle of the screen. Although the different resolutions result this pop up to jump on different coordinates on each screen.

So my question is, can ignition utilise scriptin in order to bind a script on the button to basically display that pop up on a certain coordinate only when the resolution is 1024 for instance? Would this be an event or a script attached on visibility?

Any suggestions on how the script would be like would be highly appreciated. Thank you in advance

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 27, 2020, 12:57pm UTC](https://forum.inductiveautomation.com/t/web-browser-zoom/10494/4 "2020-11-27T12:57:39Z")

</div>

This old thread is totally unrelated to Perspective (it didn’t exist in 2015). You should have posted a new topic.

---

<div class="post-metadata">

**Author:** ![alexm](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@alexm](https://forum.inductiveautomation.com/u/alexm)\
**Post date:** [November 27, 2020, 1:19pm UTC](https://forum.inductiveautomation.com/t/web-browser-zoom/10494/5 "2020-11-27T13:19:10Z")

</div>

Thanks for that Phil. I will put it as a new post. Although do you have any recommendations regarding this issue on the meantime? Would be highly appreciated. Thanks
