Solution 1 :

Here i have some idea you can try

The HTML page you can click one link, when user click the link it will open modal dialog or new page that page you can write your window opening for new pages code.. so this case when user click the link it will open new window and then the rendering process the jquery will run and open the multiple pages.. i have tried this method in our project oracle apex. it will works fine.. some time it will open 50+ pages..

Problem :

What’s best practice?

I have number of windows in page. Auth, Execution Result, Popups.

I can show it two ways:

  1. Create during HTML load in pure html with css, set it to display: none and than fadeIn through jQuery i.e.

  2. Create element when it needed with jQuery, still in display: none mode and than show it through same fadeIn i.e.

So questions:

  1. What will be faster?
  2. What will consume less memory?
  3. What’s best if I have some popup that will show only once?
  4. What’s best if I have some popup that will show many times?
  5. Is there third way?

I’m not web programmer and looking for best practice. And if there is some site with such best practices?


Comment posted by Icewine

It all depends on what will be going into the popups. If it is a heavy thing then I would load up a framework on load that was hidden. Then I would use ajax to load up the information to the individual popups when needed(if I needed to put database info there). If there will be thousands of popups that you may need to show at some time, then I would just load them when needed, otherwise just load text-based windows on load and unhide them when needed.

Comment posted by DuhVir

@Icewine In my case no heavy load at all. Just a simple forms with 10-12 elements. Sometimes with 2-3 inputs and button. I mostly fear for JS perfomance. Does creation element dynamically loads system more than pre-created element in file?