window.open and stylesheet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akg
    New Member
    • Jan 2007
    • 19

    window.open and stylesheet

    Hi Friends,
    I am using window.open(myu rl, other parameters....) method to open my url in a window. The problem is that myurl takes some time to open in the window, till that time this newly created window shows the default white background which I want to change with my page color so that user doesn't feel wrong. could sombody please help me how to change the default background color of the window.

    I can set the background property of the url to my color but the problem is that it takes some time to display in my window and till that time it remains white.

    Please help

    Thanks,
    Amit
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    I don't think that is possible. In any case, the user will probably cause the popup to appear by performing an action, e.g. clicking a link, button, etc which means they expect the popup and know it is from your site. If not, that is bad practice because users don't like popups that appear without warning.

    Also, the page should not take long to load. If it does, there may be problems in the code or you may need to make it more efficient. Perhaps you could provide the code that you are using for the myurl page.

    Comment

    • akg
      New Member
      • Jan 2007
      • 19

      #3
      Hi Acoder,
      user gets this popup window and they expect that they would be getting this popup window. Also my url takes approx 1 sec to load as it loads lots of data to show to the user and it seems user white flickering before page completly loads which I want to fill with stylesheet so that they don't see the flickering due to color change from defauly white to my url's background color.

      Thanks,
      Amit

      Comment

      • Samji
        New Member
        • Dec 2006
        • 23

        #4
        Originally posted by akg
        Hi Acoder,
        user gets this popup window and they expect that they would be getting this popup window. Also my url takes approx 1 sec to load as it loads lots of data to show to the user and it seems user white flickering before page completly loads which I want to fill with stylesheet so that they don't see the flickering due to color change from defauly white to my url's background color.

        Thanks,
        Amit
        Maybe you should address why it takes so long to load.

        Comment

        • akg
          New Member
          • Jan 2007
          • 19

          #5
          Originally posted by Samji
          Maybe you should address why it takes so long to load.
          1 sec is expected bahaviour for my client as it displays lots of data in this new window.

          Comment

          • iam_clint
            Recognized Expert Top Contributor
            • Jul 2006
            • 1207

            #6
            try window.onbefore load = document.body.b gcolor = "black";

            Comment

            • AricC
              Recognized Expert Top Contributor
              • Oct 2006
              • 1885

              #7
              Originally posted by akg
              1 sec is expected bahaviour for my client as it displays lots of data in this new window.
              1 sec is not long for a window with a lot of data to load. How much data are we talking about? For your flicker issue do a search here we talked about the screen flicker about 1 month ago.

              Aric

              Comment

              Working...