Giving a window an onblur event

Discussion in 'Javascript' started by Laser Lips, Oct 7, 2008.

  1. Laser Lips

    Laser Lips Guest

    Hi, this is not as easy as it sounds. Sorry it's long winded, here is
    some background

    I've written an application which is something like a media viewer.
    You can upload Documents, Images, Videos, Sounds and anything else you
    like. The files are stored in a database as text, not as files on the
    hard drive.

    A user can use an interface to scroll through the media that has been
    uploaded. If they scroll on to an Image, the image is retrieved from
    the database, written to a file, and then an <IMG> tag has it's SRC
    changed to the newly created file. When the user stops viewing the
    image, the image is deleted from the file system.

    If the user scrolls over something other than an image, the media is
    retrieved from the database and written to a file as before, then a
    window opens up with the location of the written file. If it happens
    to be something that the system recognises, it opens the file with the
    appropriate application. IF the Computer does not recognize the file
    it offers to download it for you, or open in an application of your
    choosing.

    This behaviour is fine, except (my boss) would like this open window
    to automatically close when the user decides to either download or
    choose an application.

    Is it possible to inject some JavaScript into the opening window for
    an onBlur event, or attach one from the opening window. So far I've
    been unsuccessful.

    Please let me know if this is not clear.

    Graham
    Laser Lips, Oct 7, 2008
    #1
    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. =?Utf-8?B?bGluZGFucg==?=

    Body onblur="window.close()"

    =?Utf-8?B?bGluZGFucg==?=, Apr 11, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    7,150
    =?Utf-8?B?bGluZGFucg==?=
    Apr 24, 2006
  2. sixteenmillion

    The giving that keeps on giving

    sixteenmillion, Nov 19, 2007, in forum: C Programming
    Replies:
    0
    Views:
    412
    sixteenmillion
    Nov 19, 2007
  3. Barry Svee

    Using onblur to detect loss of window focus

    Barry Svee, Dec 31, 2003, in forum: Javascript
    Replies:
    1
    Views:
    237
    Thomas 'PointedEars' Lahn
    Jan 11, 2004
  4. Peter Pagé
    Replies:
    4
    Views:
    150
    Peter Pagé
    Apr 2, 2005
  5. Peter Page

    Problem with <body onBlur="window.close()">

    Peter Page, Apr 1, 2005, in forum: Javascript
    Replies:
    0
    Views:
    83
    Peter Page
    Apr 1, 2005
Loading...

Share This Page