472,338 Members | 1,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,338 software developers and data experts.

onblur event not working for span element

34
I have an element that is a span. The span is filled in with data using innerHTML.

Expand|Select|Wrap|Line Numbers
  1. var celldes = row.insertCell(2);
  2.     var des = document.createElement('span');
  3.     des.id='desc' + iteration; 
  4.     des.name='desc' + iteration; 
  5.     celldes.appendChild(des);
  6.     des.innerHTML = " ";
  7.  
  8. des.onchange = function(){ SOME CODE }; //WORKS
  9. des.onblur = function(){ SOME CODE }; //NO RESPONSE
  10.  
the onchange event works, but the onblur event has no response
Dec 4 '07 #1
3 7300
acoder
16,027 Expert Mod 8TB
I'm not sure,but I don't think onblur is supported for the span tag. Does the span element ever receive focus?
Dec 5 '07 #2
gsherp
34
The onblur only works if inside the span element there is an input field.
then the onblur is connected to the blurring action on the input field.
Dec 11 '07 #3
acoder
16,027 Expert Mod 8TB
The onblur only works if inside the span element there is an input field.
then the onblur is connected to the blurring action on the input field.
That confirms what I thought.
Dec 12 '07 #4

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

Similar topics

2
by: andyalean | last post by:
Hello javascript coders :( ,I am trying to add an onblur event to my code. This is where I dynamically create a textfield.I want to assign it an...
17
by: abs | last post by:
My element: <span onclick="alert('test')" id="mySpan">test</span> Let's say that I don't know what is in this span's onclick event. Is it...
17
by: steve | last post by:
I read the book JavaScript the Definitive Guide, 3rd edition. On P217 it says I can use FOR...EVENT in <script> tag. I tried this code, it does...
2
by: Heiko Vainsalu | last post by:
Hi Hope somebody knows how to solve this one. *The Situation* A traditional situation where HTML form inputs are checked... (if simplified...
5
by: moondaddy | last post by:
I have a <a> element in a datagrid which wraps some asp.net labels. this element also has an onclick event which does not fire in netscape 6 (and...
1
by: neil S via DotNetMonster.com | last post by:
I have a custom control with a textbox and dropdown list. The dropdown list is hidden and acts as a data source for the textbox. When the user...
4
by: bgold12 | last post by:
Hey, I have kind of a weird problem. I have a span that I'm intentionally overflowing a table cell (<td>), so that it stretches over the table...
2
by: wolverine | last post by:
Hi All, In Mozilla Firefox, to onblur and onfocus event of each and every html element, the browser itself will attach a native event handler. I...
9
by: aashishn86 | last post by:
Hi!! i want to validate a list box onthe onblur event and if no value is selected , display a message on the left using <span> and innerHTML ...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...

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.