473,587 Members | 2,316 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to get attributes of a column in Netscape 4.08?

2 New Member
I need to get the attributes of a column in netscape navigator 4.08.

In IE I have got the result for the following script.

[HTML]<html>
<head>
<script language="JavaS cript">

function getAttr()
{

alert(event.src Element.classNa me);
// the output will be :- col;

alert(event.src Element.name);
// the output will be :- lblCol1;

}
document.onmous edown=getAttr;
</script>
</head>
<body>
<form name="frm1" method="post" action="">

<table>
<tr>
<td class="col" name="lblCol1" id="lblCol1">He llo</td>
</tr>

</table>

</form>
</body>
</html>
[/HTML]
What change I need to do to get the class name and name.

could anybody help me please.

Thanks in advance.
Sep 20 '06 #1
1 1257
acoder
16,027 Recognized Expert Moderator MVP
You need to pass the event as an argument for non-IE browsers, i.e.
Expand|Select|Wrap|Line Numbers
  1. function getAttr(e) {
  2.     if (!e) e = window.event;
  3.     // now 'e' is the event in all browsers
Next, the element which is the target, is srcElement in IE, but target in other browsers, so:
Expand|Select|Wrap|Line Numbers
  1. if (e.target) target = e.target;
  2. else if (e.srcElement) target = e.srcElement;
  3. // now target contains the target element
May 14 '08 #2

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

Similar topics

3
2570
by: Dan Sikorsky | last post by:
How can I get the recordset attributes for a table field in SQL Server 2000 to report the field updatable attribute correctly ... mine keeps saying the fields are not updatable? That is, ( oRecordSet ( oItem ).Attributes & 0x4) is always 0 for every field on SQL Server 2000 Example code: var sSQL = 'SELECT TOP 1 * FROM WHERE ' +...
1
3467
by: John | last post by:
I'm developing an application for medical use that will be used to capture patient background and visit data. The application will have approximately 50 forms, with an average of about 20 fields each-- so a total of 1000+ fields. Almost always, the fields are unique to a particular form--and it will be pretty unlikely that new forms and...
2
1680
by: Netto | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** When I try to use a created attribute for the tag "input", it works fine with IE 6, but it seems not to be recognized by Netscape 7.1... Are my thoughts right?? That's what I mean: I did that in a html code: <input type="text" name="inputname" required="true"> (Note: I...
6
3515
by: Olly | last post by:
I've found a basic script, however I also need to add alt and title attributes as well, how would I go about doing this? Here's the script I found: Thanks <script language="JavaScript"> <!-- /*
18
2134
by: Jonathan Carmichael | last post by:
I am building a website for the first time. In attempting to validate my frameset html file I came across the following URL http://www.w3.org/TR/1999/REC-html401-19991224/ The 3 errors I am getting are all regarding the following: <frameset rows="100,*" frameborder="0" border="0" framespacing="0"> The errors are:
4
2023
by: Mike Jansen | last post by:
Does anyone know why if I create a complexType based off another complexType using xsd:extension the attributes don't seem to be inherited? Is this a bug/non-implementation in the .NET Schema editor and the XML validator? Thanks, Mike Jansen
3
3791
by: Andy | last post by:
Hi, Have just found a bug in Netscape for some of my Javascript code - works ok in Internet Explorer. Given the following form element: <input type="text" compulsory = "yes" name="an_el"> I thought it was possible to display the value compulsory similar to getting the value of the box, E.G .
2
2241
by: silverbob | last post by:
I have been writing web pages for years using these attributes to the body tag: <body bgcolor=#FFFFFF marginwidth=0 leftmargin=0 marginheight=0 topmargin=0> I'm now attempting to bring my pages into compliancy with the latest css based standards. I have removed the bgcolor, leftmargin, and topmargin attributes in favor of style sheet...
23
1628
by: Frank Millman | last post by:
Hi all I have a small problem. I have come up with a solution, but I don't know if it is a) safe, and b) optimal. I have a class with a number of attributes, but for various reasons I cannot assign values to all the attributes at __init__ time, as the values depend on attributes of other linked classes which may not have been created...
0
7915
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...
0
7843
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...
1
7967
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...
0
8220
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...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
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...
0
3872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
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...

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.