Help Me Create an Annoying Popup Window!



  • Now that I have your attention, I have a requirement for a site I'm working on that when you click a help button next to a text box, a window pops up.  This is a page that is internal use only where I work.  I promise, I'm not doing stupid advertising.

    So here's the deal, I use this javascript to open the window:
    window.open(etc etc)

    That works great, but if the user doesn't close the window, if they just click back over to the main window and then eventually click another help button, the help window updates but doesn't raise to the front.  It stays behind the main window and the user doesn't see it - thus it's worthless.

    I've googled around for this obviously, but I haven't seen any solutions, so I'm asking here.  Does anyone know the black art of the popup?



  • body onload="self.focus()"


    wow, this was a wasted thread.  sry



  • @tofu said:

    body onload="self.focus()"


    wow, this was a wasted thread.  sry




    No, it wasn't. Others might have the same problem.



  • Dear DailyWTF, I just tried to go to the bathroom, but I was unable to pee because there is some sort of zipper blocking access to my weenor.  What should I do?  ps. I tried searching google.



  • @tofu said:

    Dear DailyWTF, I just tried to go to the bathroom, but I was unable to pee because there is some sort of zipper blocking access to my weenor.  What should I do?  ps. I tried searching google.


    Just start going. The zipper will move.

    sincerely,
    Richard Nixon



  • Adding to this, you may want to give the help window a name, so that various links on your main site will set the focus and bring it up top (when needed).



  • <body onload="window.focus()"> ?


Log in to reply