# Modal popup

**URL:** <https://techcommunity.softwareag.com/t/modal-popup/99548>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, NaturalONE, Natural-for-AJAX, Natural-on-Windows-Unix\
**Created:** [January 20, 2012, 5:06pm UTC](https://techcommunity.softwareag.com/t/modal-popup/99548 "2012-01-20T17:06:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lee\_Pearson](https://avatars.discourse-cdn.com/v4/letter/l/46a35a/32.png) [@Lee\_Pearson](https://techcommunity.softwareag.com/u/Lee_Pearson)\
**Post date:** [January 20, 2012, 5:06pm UTC](https://techcommunity.softwareag.com/t/modal-popup/99548/1 "2012-01-20T17:06:40Z")

</div>

Hi,  
We are having a few issues with programs converted from Natural to NatualONE where we are attempting to use modal popups. The basic program structure leading to the issues is below

Process page using Prog adapter….  
Value U’eventfromProgpage’  
Some code, etc  
Criteria met  
Fetch Return ‘AnotherProg’

‘AnotherProg’  
Various code…Criteria evaluated and met  
CallNat ‘subprog’ (subprog for all system pop ups)

‘subprog’  
Identify which pop up required based on parameters passed from ‘AnotherProg’  
When Identified…  
Process page modal  
Pop up window (one warning button - required to be pushed to acknowledge)  
‘buttonevent’  
Assigns value to parameter to return to ‘AnotherProg’  
End-process

Return to ‘Another Prog’ from ‘subprog’  
Continue through code until…  
‘Process page using…AnotherProg’ adapter

Expected result - display page from ‘AnotherProg’, but get…

Error:  
Multiple Natural syntax errors at this line  
- NAT5471 Identifier xyz is not defined in layout /folder/Prog adapter.  
…(Where prog adapter is the orignal prog rather than ‘AnotherProg’ as expected)

If the ‘process page modal’ is removed from the subprog, the program behaves as expected but the pop up is full screen. Is there something we are missing here as to what is happening with regards to the various process statements?

Thanks in advance for any help.

---

<div class="post-metadata">

**Author:** ![Todd\_Beckwith](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/todd_beckwith/32/388_2.png) [@Todd\_Beckwith](https://techcommunity.softwareag.com/u/Todd_Beckwith)\
**Post date:** [January 20, 2012, 8:35pm UTC](https://techcommunity.softwareag.com/t/modal-popup/99548/2 "2012-01-20T20:35:03Z")

</div>

Lee,  
I struggle with modal windows quite a bit. Your error is not the same thing I was dealing with but maybe it is the same cause. It seems that if you are on a base page and from that page a modal window is displayed, you must return to that base page before displaying other non-modal windows. For example, the following would error on the next process page using it would hit. The error was something about process page modal not supported:

r1. repeat  
process page A  
decide on _page-event  
value ‘a’  
process page modal  
process page b  
end-process  
escape bottom (r1.)  
end-repeat  
process page c /_ ← errors with process page modal not supported

By using XCITRIGGEREVENT, I was able to get around it. What happens is the last page displayed before the modal is redisplayed and immediately exited with the exitloop method.

r1. repeat  
process page A  
decide on \*page-event  
value ‘a’  
process page modal  
process page b  
end-process  
xcitriggerevent := ‘exitloop’  
value ‘exitloop’  
escape bottom (r1.)  
end-repeat  
process page c

If I read your explanation right, it sounds like you may not be returning to the page displayed before the modal and this may be the problem. Hope this helps.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:01pm UTC](https://techcommunity.softwareag.com/t/modal-popup/99548/3 "2021-04-02T15:01:28Z")

</div>


