dhtml modal windows

Discussion in 'ASP General' started by GwenP, Sep 29, 2010.

  1. GwenP

    GwenP Guest

    Hi there

    Anyone know the best way to use DHTML modal windows on a classic asp page?
    It seems in all examples we open them, then just hide them from the modal
    page to close them? Does this not just eventually hog memory - my IE has
    been crashing a lot and I'm not convinced its not due to all my open modal
    windows that are now just hidden? How do we detect using a javascript
    function (which opens the windows in the first place) if a dhtml window is
    already open but just hidden?

    Many thanks
    GwenP
    GwenP, Sep 29, 2010
    #1
    1. Advertising

  2. GwenP

    Bob Barrows Guest

    GwenP wrote:
    > Hi there
    >
    > Anyone know the best way to use DHTML modal windows on a classic asp
    > page?

    The same way you would do it on a regular htm page. This question is not
    really relevant to asp. All asp does is run on the server and generate
    html to be sent to the client. Once the client is involved, asp is out
    of the picture.
    You will likely get better answers posting to a group devoted to
    html/dhtml questions (http://groups.google.com/groups/dir?sel=33584039).

    > It seems in all examples we open them, then just hide them from
    > the modal page to close them?


    Examples? What examples? I only hide them if I intend to reuse them.
    They should be closed when no longer needed

    > Does this not just eventually hog
    > memory - my IE has been crashing a lot and I'm not convinced its not
    > due to all my open modal windows that are now just hidden?


    Try and confirm this with Task Manager

    > How do we
    > detect using a javascript function (which opens the windows in the
    > first place) if a dhtml window is already open but just hidden?
    >

    I would assume you would have set a global variable to reference the
    window when you opened it. If not, change your methodology now. You
    should create a function Called getModalWindow() that checks to see if
    the global variable contains a reference to an open window -
    if(modalvar). If so, return that variable. If not open a new window
    assigning the result of the open method to the variable and return the
    variable. In the onclose event, close the window if it is open.
    --
    HTH,
    Bob Barrows
    Bob Barrows, Sep 29, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leila
    Replies:
    0
    Views:
    395
    Leila
    Apr 26, 2005
  2. Matt
    Replies:
    1
    Views:
    3,127
    Whitecrest
    Jun 1, 2004
  3. Don
    Replies:
    0
    Views:
    342
  4. Matt
    Replies:
    0
    Views:
    214
  5. Steve
    Replies:
    1
    Views:
    273
    Richard Cornford
    Apr 9, 2005
Loading...

Share This Page