# How can I have popup window follow the configured height?

**URL:** <https://forum.inductiveautomation.com/t/how-can-i-have-popup-window-follow-the-configured-height/86047>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [February 20, 2024, 7:45pm UTC](https://forum.inductiveautomation.com/t/how-can-i-have-popup-window-follow-the-configured-height/86047 "2024-02-20T19:45:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JB77](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@JB77](https://forum.inductiveautomation.com/u/JB77)\
**Post date:** [February 20, 2024, 7:45pm UTC](https://forum.inductiveautomation.com/t/how-can-i-have-popup-window-follow-the-configured-height/86047/1 "2024-02-20T19:45:25Z")

</div>

I have a popup window to show custom filters on a table. The issue is when it opens, its at a height of 801px when it should be less than 500px depending on what menu items(s) are open.

 ![Screenshot 2024-02-19 163936](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/2/2223711c75392597a8f99f40509129cd85ed6ca5.png)

 ![Screenshot 2024-02-20 114444](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/e/bec11fee27637e60ead7452d34e7b93690747538.png)

---

<div class="post-metadata">

**Author:** ![CalebM](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@CalebM](https://forum.inductiveautomation.com/u/CalebM)\
**Post date:** [February 20, 2024, 8:13pm UTC](https://forum.inductiveautomation.com/t/how-can-i-have-popup-window-follow-the-configured-height/86047/2 "2024-02-20T20:13:57Z")

</div>

I would try to set the height of the popup to `auto` when you open it. You will likely have to open the popup via a script.

---

<div class="post-metadata">

**Author:** ![JB77](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@JB77](https://forum.inductiveautomation.com/u/JB77)\
**Post date:** [February 21, 2024, 11:25pm UTC](https://forum.inductiveautomation.com/t/how-can-i-have-popup-window-follow-the-configured-height/86047/3 "2024-02-21T23:25:37Z")

</div>

Even with a script like the following, I still couldn't get the parent container height to change to auto. I found forcing 'auto' through the css stylesheet file worked though. Was their something I was missing to have it change through the open popup script or is modifying the parent elements not possible this way.

```auto
	viewPath = "Alarm Filter/Group"
	# Define the position for the popup
	popupPosition = {
	    "left": 100,
	    "top": 100
	}
	
	# Define additional parameters, including binding the height to window height
	popupParams = {
	    "inheritedHeight": True, # Set to True for inherited height
	    # Add any other parameters as needed
	}
	
	# Open the popup view with position and additional parameters
	system.perspective.openPopup(id="filterpopup", view=viewPath, position=popupPosition, params=popupParams)
	
	# Set the height of the container to "auto" using a script
	script = """
	var popupContainer = document.getElementById("popup-filterpopup");
	popupContainer.style.height = "auto";
	"""
	system.perspective.executeScript(script)

```
