# Mobile popups

**URL:** <https://forum.inductiveautomation.com/t/mobile-popups/2601>\
**Category:** Ignition\
**Created:** [February 2, 2011, 11:14pm UTC](https://forum.inductiveautomation.com/t/mobile-popups/2601 "2011-02-02T23:14:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [February 2, 2011, 11:14pm UTC](https://forum.inductiveautomation.com/t/mobile-popups/2601/1 "2011-02-02T23:14:32Z")

</div>

How about centering popups in the middle of the current viewing area on mobile devices?

It’s a bit of a pain to realize that that yes, something did happen when you clicked that icon. It just happened off screen and now you have to go find it.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [February 2, 2011, 11:20pm UTC](https://forum.inductiveautomation.com/t/mobile-popups/2601/2 "2011-02-02T23:20:02Z")

</div>

The client has no clue what the current viewing area is. I’m not sure if I can even derive this information from the browser, but I’ll see.

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [February 2, 2011, 11:24pm UTC](https://forum.inductiveautomation.com/t/mobile-popups/2601/3 "2011-02-02T23:24:28Z")

</div>

The client does have an idea where the user just poked the screen.  
Does the client know what the current zoom factor is?  
At a minimum, could the popup be centered on where the poke just happened? (not going beyond the edge of the screen of course)

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [February 3, 2011, 5:57am UTC](https://forum.inductiveautomation.com/t/mobile-popups/2601/4 "2011-02-03T05:57:36Z")

</div>

I think you would want to try something like this.

```auto
window = system.nav.openWindow('somewindow')
window.bounds = (event.x,event.y,somewidth,someheight)

```

This doesnt take in effect the size of the viewport. Any suggestions Carl? To get the size of the main JFrame of a project is easy, however, I dont think it is as easy to get teh size of the view from the vnc side.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [February 3, 2011, 5:06pm UTC](https://forum.inductiveautomation.com/t/mobile-popups/2601/5 "2011-02-03T17:06:53Z")

</div>

Yeah you could pretty easily position the new window relative to the click as Kyle suggested. Still unsure about viewport/zoom information from the browser.

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [February 3, 2011, 8:15pm UTC](https://forum.inductiveautomation.com/t/mobile-popups/2601/6 "2011-02-03T20:15:47Z")

</div>

[quote=“Kyle Chase”]I think you would want to try something like this.  
  
[/quote]

That would work for my windows (thanks) but this topic was started because of system type windows like: “Are you sure you want to logout?” eg: system.gui.errorBox() and system.gui.confirm()
