jQuery UI Widgets Forums Dialogs and Notifications Window div position in code

This topic contains 4 replies, has 2 voices, and was last updated by  nikolayalmaty 11 years, 11 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • div position in code #8479

    I create window with next code in search_body.php file:

                        <div id='w_829' class='w_' style='visibility: hidden'>
    <div>
    <b>Тест - Поиск</b>
    </div>
    <div>
    <table width='100%' border=0>
    <tr>
    <td width=220></td>
    <td width=280 style='padding-top: 10px;'>
    <input id='Search' style='margin-right: 5px' type='button' value='Поиск данных' />
    <input id='Clear' style='margin-right: 5px' type='button' value='Очистить' />
    <input id='Cancel' type='button' value='Отменить' />
    </td>
    </tr>
    </table>
    </div>
    </div>
    <script type='text/javascript'>
    $.get('search_script.php', {
    id: 829,
    user: 'NIKOLAY',
    role: 'MAIN',
    operday: '25.09.2012',
    weekday: '25.09.2012',
    app_ver: '2.0.0.0',
    table_name: 'O_TEST'
    }, function(data) {
    $('#script_head').html(data);
    });
    </script>

    and put this window to div #win_div:

                  $.get('search_body.php', {
    id: var_id,
    }, function(data) {
    $('#win_div').html(data);
    });

    also I create script for this window in search_script.php file:

      <script type='text/javascript'>
    // Форма
    $('#w_829').jqxWindow({ width: 500, resizable: false, maxHeight: 400, theme: 'usu', autoOpen: true, isModal: true, cancelButton: $('#Cancel'), modalOpacity: 0.01 });
    $('#Search').jqxButton({ theme: 'usu' });
    $('#Clear').jqxButton({ theme: 'usu' });
    $('#Cancel').jqxButton({ theme: 'usu' });
    $('#Cancel').click(function () {
    $('#w_829').jqxWindow('hide');
    });
    $('#w_829').css('visibility', 'visible');
    // Поля
    </script>

    Before search_script.php executing, window html-code take place in #win_div.
    But after search_script.php executing, window #w_829 go away from #win_div and take place before on the top level.
    How I can save place of window #w_829 in #win_div?

    div position in code #8485

    Peter Stoev
    Keymaster

    Hi nikolayalmaty,

    As a Popup with absolute positionin, the window is detached from its current element and appended to the document’s body. That’s by design.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    div position in code #8496

    Where in code I’ve made absolute position of window?
    And how I can change this position?

    div position in code #8497

    Peter Stoev
    Keymaster

    Hi nikolayalmaty,

    jqxWindow is always with absolute position and the absolute positioning is set by the widget.

    The ‘move’ method can be used for changing the position after the window is opened.

    $('#jqxWindow').jqxWindow('move', 300, 6000);

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    div position in code #8501

    Thank you, Peter!

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

You must be logged in to reply to this topic.