jQuery UI Widgets Forums Dialogs and Notifications Window launching popup dialogue from button

This topic contains 2 replies, has 2 voices, and was last updated by  DaveC426913 12 years, 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • launching popup dialogue from button #11740

    DaveC426913
    Member

    Not sure if I’m doing this right.

    I want a button on my page to launch an OK/Cancel dialogue, then, when it closes, operate on the result. Standard.

    But the demos for jqxWindow seem to have the launch button INSIDE the widget (whose container fills the page), which then launches the window inside the container.

    I don’t get how to incorporate that into my existing page. My button already exists on my page, and i want the window to appear on top of my page. Do I need to restructure my page so that its top-level element is the widget?

    launching popup dialogue from button #11752

    Dimitar
    Participant

    Hello DaveC426913,

    You do not need an enclosing div element to display a jqxWindow. Please take a look at the following example which shows only a button and a popup window:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../scripts/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../jqwidgets/jqxwindow.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    $("#window").jqxWindow({ width: 150, height: 100, autoOpen: false, isModal: true });
    $("#button").click(function () {
    $("#window").jqxWindow('open');
    });
    });
    </script>
    </head>
    <body>
    <button id="button">
    Open popup window</button>
    <div id="window">
    <div>
    Window</div>
    <div>
    Content</div>
    </div>
    </body>
    </html>

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    launching popup dialogue from button #11781

    DaveC426913
    Member

    Thanks. These demos frustrate me.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.