473,396 Members | 1,879 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,396 software developers and data experts.

Access to input type - cross-browser

I see some people accessing a forms' input type without converting
toLowerCase() and others do. Do some browser's return type as
uppercase?

This
document.forms['myFormName'].elements['myElementName'].type=='select-one';

or this
document.forms['myFormName'].elements['myElementName'].type.toLowerCase()=='select-one';

Somewhat related, what about when tag names and events...does case
matter?

Thanks

Jul 23 '05 #1
1 1190
johkar wrote:
I see some people accessing a forms' input type without converting
toLowerCase() and others do. Do some browser's return type as
uppercase?

This
document.forms['myFormName'].elements['myElementName'].type=='select-one';

or this
document.forms['myFormName'].elements['myElementName'].type.toLowerCase()=='select-one';

Somewhat related, what about when tag names and events...does case
matter?


DOM Level 3:

1.3.1 String Comparisons in the DOM

The DOM has many interfaces that imply string matching. For

XML, string comparisons are case-sensitive and performed with a

binary comparison of the 16-bit units of the DOMStrings .
However, for case-insensitive markup languages, such as HTML
4.01 or earlier, these comparisons are case-insensitive where
appropriate.

Note that HTML processors often perform specific case
normalizations (canonicalization) of the markup before the DOM

structures are built. This is typically using uppercase for
element names and lowercase for attribute names. For this
reason, applications should also compare element and attribute
names returned by the DOM implementation in a case-insensitive
manner.

<URL:http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Core-DOMObject>
I think the last sentence is very important to your question.

--
Fred
Jul 23 '05 #2

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

Similar topics

3
by: TrvlOrm | last post by:
I am having great difficulty in these asp scripts, using VBscript and JavaScript. I have 4 files that all need to be linked together. The first file "Books.html" - needs to search for a Book...
11
by: Jon Hoowes | last post by:
Hi, I have inherited some code that has some form elements (radio buttons) that are called "1", "2" etc. for example: <input name="2" type="radio" value="45"> <input name="2" type="radio"...
14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
41
by: Ruby Tuesday | last post by:
Hi, I was wondering if expert can give me some lite to convert my word table into access database. Note: within each cell of my word table(s), some has multi-line data in it. In addition, there...
11
by: BerkshireGuy | last post by:
Hello, I need to create an interactive report that can be sent to agencies with the following: Application #, Date Approved, Reason Not Taken The reason not take should be a drop down in...
6
by: A Traveler | last post by:
I know in a css file, i can declare a style which will apply to a given HTML tag, specifically, i am looking at an INPUT tag. Is there any way in which i can create a style section which will apply...
21
by: nihad.nasim | last post by:
Hi there, I have a database in Access that I need on the web. The web page should connect to the database and write records for certain tables and view records for others. I want to know a...
7
by: Andy B | last post by:
I have a class I am creating for data access. I need to access controls from inside the class that are on a particular page. How do I do this? or is creating an instance of the page class and using...
1
by: gihan | last post by:
Hi, I have a problem accessing remote webservice from my asp code. Instead of returning results, it returns list of web methods it has. Wonder where i'm doing wrong. Also note that, this is a...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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
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.