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

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 = " ";
  8. des.onchange = function(){ SOME CODE }; //WORKS
  9. des.onblur = function(){ SOME CODE }; //NO RESPONSE
the onchange event works, but the onblur event has no response
Dec 4 '07 #1
3 7300
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
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
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

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...
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...
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...
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...
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...
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...
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...
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...
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 ...
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...
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...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
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...
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...
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...
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. ...
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...
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.