Loading ...
Sorry, an error occurred while loading the content.

Many dialogs in a single page

Expand Messages
  • Christian Tiberg
    Hello! When I have multiple dialogs on a single page, it gets very long. This fouls the look, and is outright incompatible with the Loading... panel example
    Message 1 of 2 , May 12, 2008
    • 0 Attachment
      Hello!

      When I have multiple dialogs on a single page, it gets very long. This fouls the look, and is outright incompatible with the "Loading..." panel example - the panel appears in the middle of the very long HTML, instead of in the center of the screen.

      How do I circumvent this? At the beginning I had all dialogs set to style="display: none", and set the style to display: block right before I created them. This also meant that I didn't create a dialog until the first time it was to be shown. It also had the problem of occasionally leaving me with an all grey screen, the mask wasn't removed after a dialog was closed.

      So is the correct way to do this to set style="display: none", but to create all dialogs at the start of the script, and set style="display: block" after each dialog has been created?
      --
      Best regards,
      Christian Tiberg
    • Satyen Desai
      Hi, If you re referring to space taken up by rendered but hidden Dialogs, then you can set their position to [0, 0] (or offscreen top/left if your Dialogs are
      Message 2 of 2 , May 30, 2008
      • 0 Attachment
        Hi,
        If you're referring to space taken up by rendered but hidden Dialogs, then you can set their position to [0, 0] (or offscreen top/left if your Dialogs are larger than the static content on the page) as opposed to leaving them in their default DOM positions.

        If you're referring to space taken up by the markup for a Dialog before it has been initialized/rendered, then the approach you mention, using display, is fine. You do lose out on the progressive enhancement value, unless you introduce this using JS, using say a class applied to body - but you need to make sure you set the display back to block BEFORE the Dialog is initialized

        Here's an example which covers both the above:

        http://yuiblog.com/sandbox/yui/v252/examples/container/docsize.html

        Regards,
        Satyen

        p.s. If you are resetting the display BEFORE you initialize the dialog and if you have a page where you're seeing the "all grey screen" I can take a look at it.

        ________________________________________
        From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Christian Tiberg
        Sent: Monday, May 12, 2008 5:57 AM
        To: ydn-javascript@yahoogroups.com
        Subject: [ydn-javascript] Many dialogs in a single page

        Hello!

        When I have multiple dialogs on a single page, it gets very long. This fouls the look, and is outright incompatible with the "Loading..." panel example - the panel appears in the middle of the very long HTML, instead of in the center of the screen.

        How do I circumvent this? At the beginning I had all dialogs set to style="display: none", and set the style to display: block right before I created them. This also meant that I didn't create a dialog until the first time it was to be shown. It also had the problem of occasionally leaving me with an all grey screen, the mask wasn't removed after a dialog was closed.

        So is the correct way to do this to set style="display: none", but to create all dialogs at the start of the script, and set style="display: block" after each dialog has been created?
        --
        Best regards,
        Christian Tiberg
      Your message has been successfully submitted and would be delivered to recipients shortly.