473,698 Members | 2,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with onblur=self.clo se

Hello,

I am using the following code in a popup.

<html>
<head>
<title></title>
</head>
<body onLoad="this.fo cus();" onblur="self.cl ose">
<form action="" method="get">
<table>
<tr>
<td>Would like to ba able to select following text without windows
closing</td>
</tr>
</table>
</form>
</body>
</html>

Need the popup to close when the window blurs. However I also need to be
able to select the text within the table without having the popup closing.
This will work without the table but I must use a table unfortunately. Any
ideas?

Thanks for your help.
Feb 12 '07 #1
1 2595
oliver gargour said the following on 2/12/2007 6:18 PM:
Hello,

I am using the following code in a popup.

<html>
<head>
<title></title>
</head>
<body onLoad="this.fo cus();" onblur="self.cl ose">
Should be self.close()

onblur="checkIt ()"

var closeTheWindow= true
function checkIt(){
if(closeTheWind ow){window.clos e()}
}

<td onfocus="closeT heWindow=false" onblur="closeTh eWindow=true">

Untested. The idea is to set a global flag variable when the td element
gains focus. Then check that variable when the window loses focus.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Feb 13 '07 #2

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

Similar topics

2
1744
by: Dennis | last post by:
This may be easy for most but I can't get this thing to work. I believe I followed all the instructions but when I click on the link no window opens just the default IE page cannot display. Here is exactly what I entered in the link dialog: <a href="javascript:popImage('http://www.sambuccibros.com/carseat.jpg','New Car Seat')"> Is this my problem? Please help.
4
2006
by: Raymond Wilk | last post by:
I used javascript to open a new window, then used the following to close the new window on the next click: <body onBlur="self.close()" onClick="self.close()" bgcolor="#FFFFFF"> On the new window I want to place a link to another website, and I want the new window to open the link in ANOTHER new window (not the parent window) and then self close. The idea is that on the first new window I have a picture, and a link to another website...
4
2429
by: VR | last post by:
First, greetings to everyone :) I'm doing a university seminar & I've encountered a problem. I have a gallery with thumbnails linked on pictures. What I want is popup to be opened with dimensions of linked picture after clicking on a thumbnail. I found javascript which is compatible with IE, Firefox & Opera but I can't get it to work. All I get is this http://www.justfonts.com/tini/problem.html (thumbnail dissapeared).
3
1341
by: rittersporn | last post by:
I want to model relations between "Groups" and also annotate the relations! My solution so far: Group - GroupName : Text | PRIMARY_KEY - Titel : Text - Info : Memo
2
2779
by: joe | last post by:
Question about javascript -> onblur='self.focus' I use the method <body onblur='self.focus'> to keep the child browser always on the top , it success, but the textbox inside the child browser can not type anything, why
3
2163
by: EnjoyNews | last post by:
I have a popup problem. I have a script that generates a popup for image viewing. It has 2 function, and the first is that it automaticly generates the popup window to the size of the image, and the second is that it closes the popup window when you click outside of it. It is a script I have found on the internet, since I have no experience in javascript coding.
1
2437
by: suresh_nsnguys | last post by:
Hi, i am displaying google.com website inside a frame with frameset setting onblur="self.focus();". but when i am trying to enter some text in google search box,the text is not getting displayed. when i remove this 'onblur' event handler from frameset.the text is getting displayed in search box. i don't want to remove the 'onblur' event handler and i want keyboard interaction with frames.is there any way to achieve it.
1
2765
by: liu | last post by:
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...
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8893
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4366
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4615
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
1999
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.