# Bring up another window on button click

**URL:** <https://discourse.cakephp.org/t/bring-up-another-window-on-button-click/4931>\
**Category:** Need Help\
**Created:** [September 14, 2018, 6:19pm UTC](https://discourse.cakephp.org/t/bring-up-another-window-on-button-click/4931 "2018-09-14T18:19:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhall](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jhall](https://discourse.cakephp.org/u/jhall)\
**Post date:** [September 14, 2018, 6:19pm UTC](https://discourse.cakephp.org/t/bring-up-another-window-on-button-click/4931/1 "2018-09-14T18:19:22Z")

</div>

I looked at some of the examples in here and I am still a bit confused. Can someone please provide a simple example of how to bring up another window like a modal popup.

---

<div class="post-metadata">

**Author:** ![FinlayDaG33k](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/finlaydag33k/32/1049_2.png) [@FinlayDaG33k](https://discourse.cakephp.org/u/FinlayDaG33k)\
**Post date:** [September 14, 2018, 9:26pm UTC](https://discourse.cakephp.org/t/bring-up-another-window-on-button-click/4931/2 "2018-09-14T21:26:11Z")

</div>

What CSS framework are you using (if any?)

---

<div class="post-metadata">

**Author:** ![jhall](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jhall](https://discourse.cakephp.org/u/jhall)\
**Post date:** [September 17, 2018, 1:20pm UTC](https://discourse.cakephp.org/t/bring-up-another-window-on-button-click/4931/3 "2018-09-17T13:20:09Z")

</div>

Whatever comes out of the box with cake 3

---

<div class="post-metadata">

**Author:** ![FinlayDaG33k](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/finlaydag33k/32/1049_2.png) [@FinlayDaG33k](https://discourse.cakephp.org/u/FinlayDaG33k)\
**Post date:** [September 17, 2018, 2:15pm UTC](https://discourse.cakephp.org/t/bring-up-another-window-on-button-click/4931/4 "2018-09-17T14:15:33Z")

</div>

CakePHP is a PHP framework, not a CSS framework.  
CakePHP only does server stuff and not client-side stuff.

I’d highly recommend looking into something like Bulma, Bootstrap or Materialize.

---

<div class="post-metadata">

**Author:** ![jhall](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jhall](https://discourse.cakephp.org/u/jhall)\
**Post date:** [September 17, 2018, 2:21pm UTC](https://discourse.cakephp.org/t/bring-up-another-window-on-button-click/4931/5 "2018-09-17T14:21:18Z")

</div>

Do you have any examples doing it with Bootstrap?

---

<div class="post-metadata">

**Author:** ![FinlayDaG33k](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/finlaydag33k/32/1049_2.png) [@FinlayDaG33k](https://discourse.cakephp.org/u/FinlayDaG33k)\
**Post date:** [September 17, 2018, 2:23pm UTC](https://discourse.cakephp.org/t/bring-up-another-window-on-button-click/4931/6 "2018-09-17T14:23:46Z")

</div>

Just check their docs 🙂

> **[Modal](https://getbootstrap.com/docs/4.0/components/modal/#live-demo)**
>
> Use Bootstrap’s JavaScript modal plugin to add dialogs to your site for lightboxes, user notifications, or completely custom content.

---

<div class="post-metadata">

**Author:** ![jhall](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jhall](https://discourse.cakephp.org/u/jhall)\
**Post date:** [September 17, 2018, 2:28pm UTC](https://discourse.cakephp.org/t/bring-up-another-window-on-button-click/4931/7 "2018-09-17T14:28:44Z")

</div>

Sorry I am a total newb on this so where do I put the components within the cake framework? so when I click a button in my edit view it should bring up a dialog so do I create some sorta of layout for this? How do i call the layout on the button click?

---

<div class="post-metadata">

**Author:** ![FinlayDaG33k](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/finlaydag33k/32/1049_2.png) [@FinlayDaG33k](https://discourse.cakephp.org/u/FinlayDaG33k)\
**Post date:** [September 17, 2018, 2:35pm UTC](https://discourse.cakephp.org/t/bring-up-another-window-on-button-click/4931/8 "2018-09-17T14:35:14Z")

</div>

You should put the Bootstrap files (it’s CSS and Javascript) in the head of your template.  
then on the page you want to display it, add the example code I showed you in the BS4 docs.
