473,405 Members | 2,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

onblur for table

I try to run the following code, but no onblur/onfocus events happen.
Is onfocus/onblur implemented in ie/firefox?

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<form>
<TABLE BORDER="1"
onFocus="alert('This is the Example Table')"
onBlur="alert('This is the Example Table')"
onClick="alert('This is the Example Table')"
>
<TR>
<TD>Cell Data</TD>
<TD>Cell Data<input type=button value=sometext ></TD>
</TR><TR>
<TD>Cell Data</TD>
<TD>Cell Data</TD>
</TR>
</TABLE>
<TABLE BORDER="1"
onFocus="alert('This is the Example Table')"
onBlur="alert('This is the Example Table')"
>
<TR>
<TD>Cell Data</TD>
<TD>Cell Data<input type=button value=sometextothertext ></TD>
</TR><TR>
<TD>Cell Data</TD>
<TD>Cell Data</TD>
</TR>
</TABLE>
</form>
</body>
</html>

Mar 12 '07 #1
2 11571
ASM
Mathias Fritsch a écrit :
I try to run the following code, but no onblur/onfocus events happen.
Is onfocus/onblur implemented in ie/firefox?
focus :
how do you expect to get to keep attention to a whole table ?
does document (or div) accept onFocus ?

and by the fact : how to blur it ... ?

you can have :
window.onfocus();
document.myForm.myElement.onfocus();
Probably that could work :

<table
onmouseover = "alert('this is a table')"
onmouseout = "alert('leaving table');">


--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Mar 12 '07 #2
On Mar 13, 7:10 am, "Mathias Fritsch" <mathiasfrit...@gmx.dewrote:
I try to run the following code, but no onblur/onfocus events happen.
Is onfocus/onblur implemented in ie/firefox?
Yes, but generally only where the W3C HTML 4 specification says they
should be:

<URL: http://www.w3.org/TR/html4/index/attributes.html >

i.e.

A, AREA, BUTTON, INPUT, LABEL, SELECT, TEXTAREA
Browsers do implement non-standard properties, however even if you
discover a browser that does support focus and blur events for tables,
you've already discovered two popular ones that don't.

Therefore it is not a good idea to attempt to use it.
--
Rob

Mar 13 '07 #3

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

Similar topics

9
by: Roger Withnell | last post by:
Tearing hair out time! Simple attached page shows the problem. http://www.brilley.co.uk/TestFocusSelect.htm Using a function to test if too many characters have been keyed in to a textarea....
4
by: Peter Pagé | last post by:
Hi, I've got a window with a "<body onBlur="window.close()"> tag that keeps closing prematurely. It happens when the user clicks on text inside a table in the same window. Apparently IE...
4
by: Stefan Mueller | last post by:
In my example the focus should only jump to textbox2 when you press the tab key if '11' is in textbox1. If the value of textbox1 is not '11' than the focus should be set back to textbox1. That...
1
by: KenLee | last post by:
I use asp.net 2.0. I try to use onblur in textbox of asp.net. however, it said that validation(asp.net):attribution onblur is not a valid attribute of element 'textbox' what casuse this...
1
by: oliver gargour | last post by:
Hello, I am using the following code in a popup. <html> <head> <title></title> </head> <body onLoad="this.focus();" onblur="self.close"> <form action="" method="get">
1
by: Mahesh | last post by:
Hi all, Can any one advice what can be a work around here? When i run the code below, its showing the alert msg twice onfocus out of tf1 Thanks in advance, Maheshkumar <html>
2
by: John Kotuby | last post by:
Hi all, I am integrating some 3rd party grids into a large ASPX form page in VS 2008 using VB. I have 4 different grids on the page. The object is to not allow the user to leave a grid if...
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 here's what i have written <html> <head>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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,...
0
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...
0
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
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...
0
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,...

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.