Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How can you keep a window under all other windows?

    This is my first time writing any JavaScript, so I am not very familiar with the language.

    I want to make a window be kept at the back, under all other windows. From what I understand, the method to do this would be window.blur(), but I cannot seem to get it to work. Have I misunderstood the functionality, or am I implementing it wrong? The part of the code I have that currently deals with this (or at least tries) is as follows:
    Code:
    <BODY onclick="window.blur()" >
    	<img src="imageurl" id="image"></img>
    </BODY>
    I've tried a few other events to trigger this (onmouseover, setInterval, etc.) but no way I've tried has worked.

    So, is blur() the right method to do this? have I done something wrong in the implementation? Any help and guidance is appreciated.


    Backstory (if it should matter for some reason):

    I found a webpage (here and here) that generates an image of the Earth as seen from space at a given time and I wanted to place that image, updated on a regular basis, as my desktop image. I looked around for a way to do it, but as far as I could find, there was no way to do it easily in Windows XP.

    Thus, I am now using Samurize (a program for overlaying graphics etc. at your desktop) to create a browser window that loads a html file that periodically updates the image. While this window cannot be moved and has no borders, it can be selected and if it is selected, the image is brought to the front, overlapping any other windows. I wish to make it such that this cannot happen; I have tried configuring Samurize as well as asking for help on their forums, but no luck so far.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,198
    Thanks
    80
    Thanked 4,453 Times in 4,418 Posts
    Which browser are you using?

    On Windows Vista, only MSIE seems to do this as you want.

    FireFox will, instead, bring up another FireFox browser on top of the blurred window and won't move the blurred window behind non-browser windows.

    But if you use MSIE, this code worked:
    Code:
    <html>
    <body onload="setInterval('window.blur()',5000);">
    THIS WINDOW SHOULD ALWAYS GO TO THE BACK
    </body>
    </html>
    I used 5000 (5 seconds) on purpose so I could see it happening.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    Which browser are you using?

    On Windows Vista, only MSIE seems to do this as you want.

    FireFox will, instead, bring up another FireFox browser on top of the blurred window and won't move the blurred window behind non-browser windows.

    But if you use MSIE, this code worked:
    Code:
    <html>
    <body onload="setInterval('window.blur()',5000);">
    THIS WINDOW SHOULD ALWAYS GO TO THE BACK
    </body>
    </html>
    I used 5000 (5 seconds) on purpose so I could see it happening.
    I'm using Windows XP and I am not entirely sure what browser it is I am using, though judging from the icon that shows when no image is loaded, I would say some version of Internet Explorer. Either way, adding that onload event seems to cause the image loading script to fail.

    However, I just realize that I have no need to actually use this third party software now that I wrote the update script in JavaScript, since that actually works when you set the desktop to an HTML file and then everything is working as I want it.

    Thanks for the help anyway.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •