# Close popup which was not opened by CAI adapter

**URL:** <https://techcommunity.softwareag.com/t/close-popup-which-was-not-opened-by-cai-adapter/57266>\
**Category:** Forum\
**Tags:** Former-Crossvision-Products, Application-Composer\
**Created:** [March 14, 2006, 5:55pm UTC](https://techcommunity.softwareag.com/t/close-popup-which-was-not-opened-by-cai-adapter/57266 "2006-03-14T17:55:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hjo](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@hjo](https://techcommunity.softwareag.com/u/hjo)\
**Post date:** [March 14, 2006, 5:55pm UTC](https://techcommunity.softwareag.com/t/close-popup-which-was-not-opened-by-cai-adapter/57266/1 "2006-03-14T17:55:47Z")

</div>

Hello,

is there a possibility to let the adapter close a popup like closePage() if the popup is not opened by another adaper?

For example: I open a new popup by calling in JavaScript

> [@](#):
>
> window.open(“…StartCISPage…”);

I think that the new adapter in this popup could close the window if I set manually runningInPopup to true.

But this doesn’t work.

Another possibility to close the window by using the response’s writer doesn’t work either (IllegalStateException - yes, I know, it’s described in the manual that there is no way to use the writer).

Perhaps anybody has an idea for me?

Greetz.

---

<div class="post-metadata">

**Author:** ![Bjoern\_Mueller](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@Bjoern\_Mueller](https://techcommunity.softwareag.com/u/Bjoern_Mueller)\
**Post date:** [March 14, 2006, 8:37pm UTC](https://techcommunity.softwareag.com/t/close-popup-which-was-not-opened-by-cai-adapter/57266/2 "2006-03-14T20:37:02Z")

</div>

You could put the opened page inside a frameset:

Inside the adapter you could use a new page into the frame:

Adapter.openPageInTarget(“page.html”,“cistop”);

Inisde the page.html page you then can use any Javascript to close the popup.

Bjoern

---

<div class="post-metadata">

**Author:** ![hjo](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@hjo](https://techcommunity.softwareag.com/u/hjo)\
**Post date:** [March 15, 2006, 1:22pm UTC](https://techcommunity.softwareag.com/t/close-popup-which-was-not-opened-by-cai-adapter/57266/3 "2006-03-15T13:22:18Z")

</div>

Thanks for the advice.  
Now, I found a solution which is still easier (in my opinion): instead of using a frame and calling openPageInTarget(), I open just my CISPage (without frame) and forward via switchToPage() to a normal html page with the corresponding javascript code.

---

<div class="post-metadata">

**Author:** ![Bjoern\_Mueller](https://avatars.discourse-cdn.com/v4/letter/b/e9bcb4/32.png) [@Bjoern\_Mueller](https://techcommunity.softwareag.com/u/Bjoern_Mueller)\
**Post date:** [March 15, 2006, 8:24pm UTC](https://techcommunity.softwareag.com/t/close-popup-which-was-not-opened-by-cai-adapter/57266/4 "2006-03-15T20:24:40Z")

</div>

…well, I must admit: your solution is simpler. 😉  
Bjoern

---

<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, 2:38pm UTC](https://techcommunity.softwareag.com/t/close-popup-which-was-not-opened-by-cai-adapter/57266/5 "2021-04-02T14:38:31Z")

</div>


