JavaScript - Firefox problem

Asked By mostafa hamdy
17-Aug-06 08:03 AM
hi all
I have web page which contains table with ans  I  set for each row in   the table Name and Id attributes,and when I try to access soecific row in the table by name it works very  fine with IE but it makes problems with firefox and it display in the alert undefined: the code is listed below
-------------HTML code-----------------------
<table width="50%" bgcolor="#000000">
<tr id="tr1" name="firsttr"><td></td></tr>
<tr id="tr2" name="secondtr"><td></td></tr>
<tr id="tr3" name="thirdtr"><td></td></tr>
</table>
------------------------JS code---------------------------
function myFunction()
{
var trname = document.getElementByid('tr1').name ;
alert(trname);
}
plz if any body can help me in solving this problem plz send me
bets regards
Mostafa

Firefox  and IE issues  Firefox and IE issues

17-Aug-06 08:10 AM
This will help u : http://west-wind.com/weblog/posts/1463.aspx

Example:  Example:

17-Aug-06 09:02 AM
function myFunction() 
{ 
var trname = document.getElementById('tr1').attributes['name'].value;
alert(trname); 
}

Table Row Does not have a Name Attribute  Table Row Does not have a Name Attribute

17-Aug-06 09:25 AM
Hi,

As per W3c Specifications a Table Row does not have a name attribute.
Hence it is not advisable.
You can use the IDs for the same?
Is there any specific constraint that makes you use the name?
Let me know in case I can help you.

-
Chandu
  Asked By Sushila Patel
17-Aug-06 12:23 PM
function myFunction() 
{ 
var trname = document.getElementById('tr1').getAttribute('name')  ; 
alert(trname); 
} 
Tested on Firefox and IE
Create New Account
help
Problem with XP scheduler? C++ / VB I am having firefox 3.5.5 and 3.5.6 freeze my box when I update several tabs 1) SystemTimeToFileTime (1) UNIX (1) XP (1) I'd say it is a problem with Firefox. Send a bug to them. Well, I did post to a forum and its been expert discussions on C++, MFC, VC, ATL, STL, templates, Java, Python, Javascript Anyone can file Firefox bugs. You just have to create an account on their bug-tracking site (which is causing the problem. Most likely, the difference in Windows 7 has nothing to do with Firefox, but a better driver for some piece of HW in your system. You can test the XP scheduler or something of a kind, it is one thing. If it is firefox proper, it is another thing. If it is firefox bad plugings, it is a totally different thing. Except I am still having a hard time comprehending how firefox can lock the mouse, unless it runs in a kernel mode. Mouse is a highest me which process is eating up the cpu time. I was hoping to see the firefox doing it. But the problem is. Once it locks up, it locks up so bad
XHTML, Bookmarks EW inserts obsolete "name" attribute a element title attribute .NET Framework When inserting a bookmark in an EW webpage using the doctype XHTML it uses the attribute "name" . It look like : The problem is that the "name" attribute doesn't validate. In my Visual Web Developer Express 2008 it gives the error I checked the w3c website and it says something about the "title" attribute I thought it would be using the 'title' attribute with the "a" element. I'm missing something. Why does EW use the outdated , non-validating "name" attribute? What is the newer construct? for XHTML. DS Expression Web Designer Discussions Expression Web (1 other instances. The id must be unique and follow the rules described for the "name" attribute. If no "href" attribute is defined, the visual aspect of text is not changed. e
NET appplication in debugging mode, edit the application's web.config and assign the "debug" attribute in < compilation > section to "true" as show below: < configuration > < system.web > < compilation defaultLanguage = "vb" debug = "true" / > . . . . . . . . . < / configuration > • This case-sensitive attribute 'debug tells ASP.NET to generate symbols for dynamically generated files and enables the debugger the purpose of XML Namespaces? An XML Namespace is a collection of element types and attribute names. It consists of 2 parts 1) The first part is the URI used to identify the namespace 2) The second part is the element type or attribute name itself. Together they form a unique name. The various purpose of XML Namespace are elements in a parts catalog to provide part descriptions. Or you might use the nil attribute defined in XML Schemas to indicate a missing value. • < Department > < Name > DVS1< / Name > < addr:Address a particular class. For example, a field or property can be marked with the [XmlIgnore] attribute to exclude it from serialization. Another example is the [XmlElement] • attribute, which can be used to specify the XML element name to be used for a SoapFormatter / BinaryFormatter can also be controlled to some extent by attributes. For example, the [NonSerialized] attribute is the equivalent of XmlSerializer's [XmlIgnore] attribute. Ultimate control of the serialization process can
The alt attribute's description is not being displayed in firefox. The description of the alt attribute of the web page is shown in the internet explorer but not been seen in firefox if i run the same page. Use the title attribute instead of alt . Alternate text is meant to be displayed when an image or other image.ext" title = "Text you want shown as a tooltip" alt = "alternate text"> The title attribute works in IE as well. If there is no title attribute, IE will display alt text as a tooltip. firefox doesn't do this since the title attribute can be used for this purpose. Check
the space or padding (unless there is a way to change the default padding / spacing). Firefox says the value should be an integer or a percentage, but I do not want strangely enough, validates with W3 but I have still got a couple of nits with Firefox. I tried removing px from the values (did a global search / replace) and that is is perfectly valid. Validate from the W3C http: / / jigsaw.w3.org / css-validator / instead of Firefox. - - Cheryl D Wise http: / / by-expression.com What you say is true . . . W3 did give me the thumbs up on it . . . but Firefox was fussed with it . . . then I fussed with it. So after more sniffing around (after original post) . . . I thought I'd simply remove the units (did a global replace) . . . and Firefox was happy. I have put up another post, on something else I am fussing with value different from zero, it is required to append the dimention. No difference here in FireFox. Because FireFox stick to W3 in this respect. . Be carefull when you read postes from the regulars wife or any other person than you?.: Line 310, Column 122: Bad value 1 for attribute border on element img: Only 0 is a permitted zero literal. . Lehner]" align = "left" border