jQWidgets Forums

jQuery UI Widgets Forums Dialogs and Notifications Window Window auto width and height

This topic contains 5 replies, has 4 voices, and was last updated by  Peter Stoev 11 years, 5 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Window auto width and height #31133

    Dundee
    Participant

    Is any way to make a kind of auto size for window…like the more the window have content..the more the size increase…It could help to avoid some scroolbar..???

    Window auto width and height #31162

    Dimitar
    Participant

    Hello Dundee,

    To achieve this, please set the width and height properties to “auto”, e.g.:

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/jquery-1.10.2.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: 'auto', height: 'auto' });
    });
    </script>
    </head>
    <body class='default'>
    <div id="window">
    <div>
    Title</div>
    <div>
    Very Long Content<br />
    Very Long Content<br />
    Very Long Content</div>
    </div>
    </body>
    </html>

    Best Regards,
    Dimitar

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

    Window auto width and height #32340

    jimg
    Participant

    The ‘auto’ parameter value for the width and height properties does not work for me. Only a very small amount of the window content is shown, and scroll bars are shown instead. In my case the window would need to be at least 5 or 6 times as big as it is shown by default. My window statement is as follows:

    $(“#selectOrder”).jqxWindow({ theme: xxxxxxxx.theme, isModal: true, position: { x: 160, y: 170 }, width:’auto’, height:’auto’, animationType:’none’, autoOpen: false });

    My window content is one line of text, followed by a table with 2 rows and 4 columns that contain text and links, followed by a link. The table content is generated dynamically from results of an ajax call. However the window size isn’t even big enough to show the first line of static text.

    This is basic window functionality. What do I need to do to make this work?

    Window auto width and height #32343

    jimg
    Participant

    Please disregard my last post. I found the answer in another post that says you need to populate the contents div in the window before showing it. That indeed does work.

    Window auto width and height #32447

    jimg
    Participant

    The ‘auto’ parameter doesn’t work correctly for IE8 and IE9. Even if I set all the HTML content in the window before calling jqxWindow(), the horizontal size stretches out beyond the right edge of the browser, and the height is too short. Is this just a result of not supporting older versions of IE? We have plenty of users who use IE8 & 9.

    Window auto width and height #32451

    Peter Stoev
    Keymaster

    Hi jimg,

    We do support old browsers, but we are not those that decide how an old browser will auto-size a content with “auto” setting. In addition, you should take into account what kind of HTML you place in a window, because for example DIV tags are not auto-sized. DIV tags are usually stretched horizontally.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.