473,669 Members | 2,372 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Uppercase or Lowercase?

Hi!

I wonder: is '<SCRIPT TYPE="TEXT/JAVASCRIPT1.2"> ' a correct way of
starting? Or should it be kept in lowercase?

Jul 26 '06 #1
6 2490
Krij wrote:
Hi!

I wonder: is '<SCRIPT TYPE="TEXT/JAVASCRIPT1.2"> ' a correct way of
starting? Or should it be kept in lowercase?
There's no text/javascript1.2 or anything like that, as for casing, stick with lowercase and
you're fine :), though it doesn't quite matter for the sake of <scriptbut it may depending on
document DTD used.
Danny
Jul 26 '06 #2

Krij wrote:
Hi!

I wonder: is '<SCRIPT TYPE="TEXT/JAVASCRIPT1.2"> ' a correct way of
starting? Or should it be kept in lowercase?
The case of tag and attribute names is irrelevant in HTML, it matters
greatly in XML (and hence XHTML).

The case sensitivity of the attribute's value depends on the attribute
- a script element's type attribute is case insensitive.

However, the *value* of the script element's type attribute is
extremely important: any value other than 'text/javascript' will cause
many browsers to ignore the content. You are actually better off to
leave the value empty or not have the attribute at all, in which case
browsers (in most circumstances) will assume JavaScript or JScript
(noting that validators will take exception to missing required
attributes).
--
Rob

Jul 26 '06 #3
Danny wrote:
Krij wrote:
Hi!

I wonder: is '<SCRIPT TYPE="TEXT/JAVASCRIPT1.2"> ' a correct way of
starting? Or should it be kept in lowercase?

There's no text/javascript1.2 or anything like that,
Yes, there is - there was a version 1.2 of JavaScript which one sees
used from time to time as the value of the (deprecated) language
attribute. Using it there can have serious ramifications depending on
the browser. Using it as the value of the type attribute has possibly
more serious ramifications because it will stop the script content from
being executed at all in some browsers but not others.

Whether one effect is more serious than the other is moot.

as for casing, stick with lowercase and
you're fine :), though it doesn't quite matter for the sake of <scriptbut it may depending on
document DTD used.
The HTML 4 Strict DTD does not define any values for a script element's
type attribute, nor the case of tags or attribute names. HTML 4 is
case insensitive:

<URL: http://www.w3.org/TR/html4/intro/sgmltut.html >

The case sensitivity of attribute values is defined in the HTML
specification, not the DTD.

<URL: http://www.w3.org/TR/html4/interact/...ml#edef-SCRIPT >
--
Rob

Jul 26 '06 #4
RobG skrev:
Danny wrote:
Krij wrote:
Hi!
>
I wonder: is '<SCRIPT TYPE="TEXT/JAVASCRIPT1.2"> ' a correct way of
starting? Or should it be kept in lowercase?
There's no text/javascript1.2 or anything like that,

Yes, there is - there was a version 1.2 of JavaScript which one sees
used from time to time as the value of the (deprecated) language
attribute. Using it there can have serious ramifications depending on
the browser. Using it as the value of the type attribute has possibly
more serious ramifications because it will stop the script content from
being executed at all in some browsers but not others.

Whether one effect is more serious than the other is moot.

as for casing, stick with lowercase and
you're fine :), though it doesn't quite matter for the sake of <scriptbut it may depending on
document DTD used.

The HTML 4 Strict DTD does not define any values for a script element's
type attribute, nor the case of tags or attribute names. HTML 4 is
case insensitive:

<URL: http://www.w3.org/TR/html4/intro/sgmltut.html >

The case sensitivity of attribute values is defined in the HTML
specification, not the DTD.

<URL: http://www.w3.org/TR/html4/interact/...ml#edef-SCRIPT >
--
Rob
Hi!

Thanks for answering. Yes, of course I meant: '<SCRIPT
TYPE="TEXT/JAVASCRIPT"with out the value id.

Had a discussion with my teacher on this subject. He gave me incorrect
answer on a test I did. He meant that lowercase is the recommended way
to go. Couldn't find any in the JavaScript 1.5 book I used so I argued
against :-)

Geir Smevig-Baardsen
MCP
http://www.geirb.info
*************** ****
*Don't reply to my
*email.
*Reply to group
*:-)
*
*
*************** ****

Jul 26 '06 #5
RobG said the following on 7/26/2006 1:52 AM:
Krij wrote:
>Hi!

I wonder: is '<SCRIPT TYPE="TEXT/JAVASCRIPT1.2"> ' a correct way of
starting? Or should it be kept in lowercase?

The case of tag and attribute names is irrelevant in HTML, it matters
greatly in XML (and hence XHTML).
And since 90% of the browsers on the web don't understand xHTML, its not
a big issue is it?
The case sensitivity of the attribute's value depends on the attribute
- a script element's type attribute is case insensitive.
Nor is the mime type people use defined anywhere.
However, the *value* of the script element's type attribute is
extremely important: any value other than 'text/javascript' will cause
many browsers to ignore the content. You are actually better off to
leave the value empty or not have the attribute at all, in which case
browsers (in most circumstances) will assume JavaScript or JScript
(noting that validators will take exception to missing required
attributes).
Aside from the validators, the only UA that *might* get confused by a
<scripttag would be IE and that is in limited circumstances.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 26 '06 #6
Randy Webb skrev:
RobG said the following on 7/26/2006 1:52 AM:
Krij wrote:
Hi!

I wonder: is '<SCRIPT TYPE="TEXT/JAVASCRIPT1.2"> ' a correct way of
starting? Or should it be kept in lowercase?
The case of tag and attribute names is irrelevant in HTML, it matters
greatly in XML (and hence XHTML).

And since 90% of the browsers on the web don't understand xHTML, its not
a big issue is it?
The case sensitivity of the attribute's value depends on the attribute
- a script element's type attribute is case insensitive.

Nor is the mime type people use defined anywhere.
However, the *value* of the script element's type attribute is
extremely important: any value other than 'text/javascript' will cause
many browsers to ignore the content. You are actually better off to
leave the value empty or not have the attribute at all, in which case
browsers (in most circumstances) will assume JavaScript or JScript
(noting that validators will take exception to missing required
attributes).

Aside from the validators, the only UA that *might* get confused by a
<scripttag would be IE and that is in limited circumstances.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Hi!

And finally a light seems to shine in the horizon. What are we
discussing here?
Of course not JavaScript. JS contains no tags, as I understand. So it
has to be HTML. I pointed this out to my teacher and he finally agreed.
Tags in HTML 4.0 ++ are case insensitive, as another in this thread
pointed out.

Thanks to all :-)

Geir Smevig-Baardsen
MCP
http://www.geirb.info
*************** ****
*Don't reply to my
*email.
*Reply to group
*:-)
*
*
*************** ****

Jul 27 '06 #7

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

Similar topics

23
25925
by: Hallvard B Furuseth | last post by:
Has someone got a Python routine or module which converts Unicode strings to lowercase (or uppercase)? What I actually need to do is to compare a number of strings in a case-insensitive manner, so I assume it's simplest to convert to lower/upper first. Possibly all strings will be from the latin-1 character set, so I could convert to 8-bit latin-1, map to lowercase, and convert back, but that seems rather cumbersome.
8
4309
by: Markus Dehmann | last post by:
My ios::uppercase (and others) seems not to work. #include <iostream> using namespace std; int main(){ int num = 45; cout.setf(ios::hex | ios::showbase | ios::uppercase); cout << "number " << num << endl; return 0; }
1
3256
by: The_Kingpin | last post by:
Hi all, I need to make a function that convert a string into a certain format. Here what are the restriction: -The first letter of the first and last name must be uppercase. -If a first name contains only 1 character, a '.' must follow the char. -If we find a character that isn't a letter (.&*-), we must swap it for a '/' and add the correct spaces. I tried making a function but my switch seems to have an error. If anyone
6
47289
by: BSHELTON | last post by:
How do I convert existing lowercase data to uppercase in Access 2000? I used the following which did not work? UPDATE HousingTowns SET tMunis=UPPER(tMunis); "HousingTowns" is the table name. "tMunis" is the field name in which the lowercase text is stored in 154 000 rows. I get the error message "Undefined function 'UPPER' in expression".
2
2729
by: t8ntboy | last post by:
I have a table the contains field called PersonID. Each record in the personID field begins with the letter "p" in uppercase or lowercase. I want to run a query that finds all of the lowercase "p"s and converts them to uppercase. I cannot figure out how to do this easily as there are over 30,000+ records. Can someone point me in the right direction? Thanks
4
2463
by: titan nyquist | last post by:
Why does ToTitleCase not work if the case is already in upper case? I have to make my string lowercase, first, before I pass to to ToTitleCase to have it work. Titan
4
4784
by: jerger | last post by:
i have a great program now with the help of a member from this site, but i need a little customization to meet the needs of non-english speakers... who might accidendtly type punctuation which would give a false negative dictionary response... so if the user types in: i need uppercase to become lowercase too what i would like is to remove commas, periods, exclamation points and question marks and apostrophes from the strings before it...
7
1906
by: tom harrison | last post by:
i'm so glad i found this forum! i have to have some coursework done by the end of the week and i really need it explaining to me. i'm not really that big on stuff like this but it's a part of my web design course. i've found everything else pretty easy and enjoyable until i got baffled by perl. anyway here's the task "Create a Perl scirpt which converts HTML tags into uppercase for a given file. When run, the scirpt should prompt the user...
9
4843
by: humaid | last post by:
hi guys,i have this problem.first let me show you the so far code #!/user/bin/perl while ($a = <STDIN>) { if ($a =~ tr/A-Z/a-z/) { print "$a\n"; }
1
3237
by: peacock97 | last post by:
I have an access mailing list. I received it in UPPERCASE and have been able to change the 1st letter to UPPERCASE and the rest to lowercase except that in Proper Names like McDonald, McInnis, they come out as Mcdonald or Mcinnis. I have tried to modify my query to accommodate this; however, unsuccessfully. Here is my query, and wondering how I could change it to accommodate my problem: UPDATE SET .LastName = StrConv(,3), .FirstName =...
0
8465
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8803
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8587
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7407
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4206
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2029
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1787
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.