473,941 Members | 5,341 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

onblur() not working with mozilla

5 New Member
Hi,

I am facing an issue with the onblur() event. The requirement is when i click a small icon in my html page a small rectangular overlay containing some text message should appear and it should disappear when I click any where else on the page.

I have implemented the situation using java script. To bring the overaly using java script, the display property of a div is made visible and to make the same overlay hidden i have used the onblur() event.

<div id="linker3" class="linker" onBlur="showBlu r('linker3')" > </div>
The id linker3 is the name of the popup layer as i use 5 similar pop ups.

class linker defines the properties of the pop up.
Expand|Select|Wrap|Line Numbers
  1. .linker{
  2.     background: url(Images/box.gif) no-repeat;
  3.     width: 128px;
  4.     height: 46px;
  5.     margin: 30px 0 0 0;
  6.     position: absolute;
  7.     z-index: 80;
  8.     display: none;
  9. }
  10.  
function showBlur(id){
var box=document.ge tElementById(id );
box.style.displ ay='none';
}



This is working fine for IE6 but not for mozilla. Could you please help
Nov 6 '08 #1
10 7132
shane3341436
63 New Member
Did you check what error appears in the firefox error console?
Nov 6 '08 #2
tijo
5 New Member
No error is shown in the error console. Is the issue due to the fact that mozilla doesn;t recognize onblur() event.
Nov 6 '08 #3
shane3341436
63 New Member
Firfox do recognize onblur function. Though, make sure that if the function is being called or not, something like inserting alert() inside the function.
Nov 6 '08 #4
tijo
5 New Member
Hi,

When i repalced the onblur event with ondblclick(), it worked fine for both IE and Mozilla, ie the overlay div was made dispaly none uisng the same script.

<div id="linker2" class="linker" ondblclick="sho wBlur('linker2' )" > </div>

When If repalced it with onblur(), IE alone recognizes

Do you know any other way to meet this requirement
Nov 6 '08 #5
shane3341436
63 New Member
Another way may be using the javascript timer functions.After some time interval you can hide the popup.
Nov 6 '08 #6
tijo
5 New Member
No That cannot be done in this application. This pop up should be closed only when a click is made some where else on the page. Can you suggest a method.
Nov 6 '08 #7
shane3341436
63 New Member
what about onmouseout() function?
Nov 6 '08 #8
tijo
5 New Member
Sorry,

The client requires a click outside that div to close the popup
Nov 6 '08 #9
shane3341436
63 New Member
then use the onclick event of the body element. There seems a real problem with onblur event in the 'div' for the firefox.
Or there is a tricky way to force input element behave like div. The onblur method works fine in input elements.
Nov 6 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

3
17763
by: Wendy S | last post by:
I'm trying to make sure that a form gets submitted when the person leaves this field. <input type="text" name="prospectNameOrId" size="50" value="" onblur="setUserAction('Add Prospect'); document.forms.submit();"> In IE6, I get 'Object doesn't support this property or method'. I'm using document.forms elsewhere, and I have found examples on the web using this syntax, so I'm not sure what the problem is. Can I not do this in onblur?
2
3744
by: D. Alvarado | last post by:
Hi, I'm having some trouble with the "onBlur" event in the BODY tag. Ideally, what I want to happen is that when someone leaves window A, window A executes a command. I had put <body onBlur="savePage();"> I have a couple of problems. On IE 6 (win2000), whenever I put the cursor focus on a textfield within window A, the "savePage" function is invoked. And on Mozilla Filefox 0.9.1, the event never launches even when I leave the...
6
7346
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 WinIE6. WinIE6 says there's an error in the code, but the debugging info says the problem is on line 1 char 1, which are comments. <Body bgcolor='black' Text='#dbdbdb' onblur='window.resizeTo(150,150)'
2
3151
by: Suresh | last post by:
Can anybody tell me that whether Mozilla supports onBlur event? I tried onBlur event with IE5 and also with Mozilla. But Mozilla is not supporting. Please give me a solution. Regards Suresh.
1
3382
by: anand basha | last post by:
Hi ! What is the replacement for onBlur in Mozilla <body STYLE='background-color:buttonface;' leftmargin=0 rightmargin=0 topmargin=0 bottommargin=0 onBlur="window.focus()"> *** Sent via Developersdex http://www.developersdex.com ***
1
2115
by: haisenthilk | last post by:
Hi I have a text box. I have to validate it only for numbers. There is another text box which depends on the value of the previous. so i should do the validation in onBlur().. If conditions fail while validating, am bringing back the focus to tat text box. my problem is, this is working fine in Internet Explorer but
3
2581
by: rjones326 | last post by:
Hi, I'm stupendously mystified by this strange activity. I cannot for the life of me figure out why this will not work in mozilla. I've spent hours mucking around with it. The php file is just an echo statement now to simplify for the moment. If instead of calling the replace function I've also tried putting in an alert function. Alert works, the calling the php file does not. Any suggestions greatly appreciated, I've never...
10
2475
by: John Kotuby | last post by:
Hello all... I am working on an ASP.NET 2.0 application with VS2005 and VB. I have chosen to use popup windows in some cases because it makes the user experience better (according to all the users I have polled who will be using this app). In an attempt to keep the popup from disappearing behind the calling window, I am adding the onblur="FocusMe():" event to the Body tag of the popup. I really want onblur to react to any click outside...
3
1347
by: empiresolutions | last post by:
i am using the following AJAX request method. Most of you probably use this script allready as it seems to be everywhere online. I use it often with out issue... until now. What I'm finding is that if the click used to initiate the onblur() used like <input type="text" id="qty" name="qty" value="" onblur="makeRequest('ajax_insert.php?field_name=qty&field_value=',this.value);"> is on either a link or from submit button, the onblur() never...
0
9964
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
11529
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...
0
11111
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11294
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
10659
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...
0
9858
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4908
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 we have to send another system
3
3505
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.