473,513 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<body onBlur="self.close()">

liu
I have some thumbnails and once clicked it creates a new window. I
don't want extra windows everywhere so I'd like it to auto-close when
it's in the background.

I've found <body onBlur="self.close()" onClick="self.close()"to do
the trick, but some windows are longer than 1 page that a user need to
scroll the window to see it. With the script above, it closes even
when clicked. I took onClick="self.close()" out but it still does the
same thing.

How do I make it so that it only closes when it's not the top window?

Thanks for the help,

liu

Jul 21 '07 #1
1 2743
liu wrote on 21 jul 2007 in comp.lang.javascript:
I have some thumbnails and once clicked it creates a new window. I
don't want extra windows everywhere so I'd like it to auto-close when
it's in the background.

I've found <body onBlur="self.close()" onClick="self.close()"to do
the trick, but some windows are longer than 1 page that a user need to
scroll the window to see it. With the script above, it closes even
when clicked. I took onClick="self.close()" out but it still does the
same thing.

How do I make it so that it only closes when it's not the top window?

Thanks for the help,
My idea is NOT to use a "new window", read "pop-up".
It could be changed to a sepreate tab, overhere that is, or be refused by
pop-up blockers.

Use a absolute div that comes in front of your normal layout,
like in "Overlib" [use "sticky" version] and many other applications,

<http://www.bosrup.com/web/overlib/>
or
<http://www.macridesweb.com/oltest/>

or more appropriate in this NG, write one yourself.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 21 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
1886
by: Uwe Mayer | last post by:
Hi, when extending a build in class, what does the constructor __init__(...) have to return? and how does the constructor call its base-class construtor? (or is this done automatically?) I...
9
5340
by: Arash Dejkam | last post by:
Hi All, Is it possible to write on an <OBJECT type="text/html"> using document.write() from within the html containing that tag the way we write on a popup window? I couldn't do that after a lot...
6
7277
by: rob | last post by:
Hi I'm trying to create a "roll-up" effect when a window loses focus and then "roll-down" when it regains focus. This statement works properly with every browser I can get my hands on EXCEPT...
23
16105
by: Loony | last post by:
I have got a code like this in HTML section in ASP file which includes javascript file! The script works under MS IE but doesn't with Firefox! Can anybody tell me what is wrong? <HTML>...
22
129965
by: stephen | last post by:
I have created an order form that users javascript to create a new html document when the customers clicks the "print page" button. Once the new document has been created it then prints the...
4
14431
by: stevong | last post by:
It works on Konquerer though. I remember it works on IE too. I've tried window.close() too. Doesn't work on Firefox also. I've also tried to create a function. It doesnt work on Firefox also....
0
7175
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7391
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7120
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4754
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3247
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3235
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1609
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
466
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.