Thread: is there a difference between <script language="javascript> and <script type="text/javascript">
Results 1 to 9 of 9
Related
-
adsense javascript in php "print" Forum: Google Adsense
Replies: 4 -
add "human input" code to existing script Forum: CGI Perl Forum
Replies: 0 -
input type=hidden name="to" VALUE="user@yahoo.com" Forum: HTML Forum
Replies: 1 -
I need help finding a script for a "you are here" for webpages Forum: Website Scripts Forum
Replies: 1 -
Javascript - Convert int to char (1 -> "001") Forum: Javascript Forum
Replies: 1
-
06-13-2004, 12:50 PM #1
is there a diffrence between <script language="javascript> and <script type="text/jav
hi this has been bothering me since the beging of time is there a diffrent between
<script language="javascript>
and
<script type="text/javascript">
if there is what is it... if not which one is better to use
-
06-13-2004, 03:30 PM #2bald headed old fart
Status- Offline
Join Date- Aug 2003
Location- chertsey, a small town 25 miles south west of london, england.
Posts- 739
Hi there orisma,
Yes, there is a difference .
<script language="JavaScript"> is incorrect
There is no attribute "language" it has been deprecated.
The required attribute is "type" and the type="text/javascript"
Hence...
<script type="text/javascript"> is now the correct form
coothead
-
06-13-2004, 03:36 PM #3
-
06-13-2008, 07:54 AM #4
Re: is there a diffrence between <script language="javascript> and <script type="text
Firefox and IE are adding this script to the top of one of my pages. Since the language tag is deprecated, why would they still be using it?
----------
<script language="JavaScript">
<!--
function SymError()
{
return true;
}
window.onerror = SymError;
function SymInitWinOpen()
{
if (SymRealWinOpen == null)
SymRealWinOpen = window.open;
return SymWinOpen;
}
function SymWinOpen(url, name, attributes)
{
return (new Object());
}
var SymRealWinOpen;
window.open = SymInitWinOpen();
//-->
</script>
----------
-
08-17-2008, 12:48 PM #5
Re: is there a diffrence between <script language="javascript> and <script type="text
That's Symantec AntiVirus adding all that crap.
-
08-17-2008, 01:52 PM #6
Re: is there a diffrence between <script language="javascript> and <script type="text
When I originally asked my question, I didn't know how that code was getting there. Symantec seems to feel that they can do what they want. I just had a huge battle getting Norton out of Firefox. The new version of Norton 360 automatically installs a toolbar into Firefox. There is no uninstall option. After uninstalling Firefox 3 times, I finally figured out a way to get rid of Norton. In the Mozilla Firefox components folder there is a file called: coFFPlgn.dll. I overwrote the coFFPlgn.dll with a blank file and then set it to read only. That got rid of the Norton Firefox Tool Bar. It really sucks how Symantec acts more like a virus than an anti-virus program.
Still none of this answers my question. Why is the above code being used at all when it is incorrect? Are they really that stupid or is there some advantage to using it that nobody talks about?
-
08-17-2008, 04:25 PM #7bald headed old fart
Status- Offline
Join Date- Aug 2003
Location- chertsey, a small town 25 miles south west of london, england.
Posts- 739
Re: is there a diffrence between <script language="javascript> and <script type="text
Hi there cigarettes,
Still none of this answers my question.
Why is the above code being used at all when it is incorrect?
It means that it is outdated and should be considered as poor coding practice.
At present deprecated attributes and also deprecated elements will still work.
This is to preserve backward browser compatibility.
Eventually they will be dropped completely and will no longer be usable.
Are they really that stupid or is there some advantage to using it that nobody talks about?
Common sense says that the continued use of cigarettes is an act of gross stupidity but that
does not stop those that believe otherwise from filling their lungs with toxic matter.
Further reading:-
- http://www.w3.org/TR/html401/conform.html#deprecated
- http://css-tricks.com/list-of-deprec...idespread-use/
- http://www.w3.org/TR/REC-html40/index/attributes.html
coothead
-
08-17-2008, 05:56 PM #8
Hey Communist. Nice Post for a hypocrite.
That was a really off-topic remark. You have no right to insult me. I'd say that you must think you are super smart. With a name like coothead, you must be a genius along with being a hypocrite. (Got any bad living habbits in the closet? Do tell)
How about the obvious...
Do you own a car? Do you ever drive in one? The toxic fumes that come out of your automobile would kill you if you stood in your garage breathing it for an hour. Yet, you drive one. Tell me, why do you think you can judge me when the damage you do to the Earth is so much worse? Why do you think that you have a right to pour clouds of car exhaust into the atmosphere and make me breathe it? Because everyone does it? Because there isn't a law against it? Please, before you judge me, look at your own life and how you destroy it through your own actions. At least, when I smoke I only hurt myself. That's my choice. You hurt everyone and nobody can do anything to stop it. Why do you think you are soooo much better?
Learn some history friend. While writing the Constitution, the Founding Fathers took smoke breaks. If they thought that America should delve into the private lives of citizens, don't you think they would have written it into the Constitution? Do you really want the government regulating what you eat, drink, smoke, how you have sex, what you say, what you read, who you visit. No. There's a reason the Constitution is so extremely careful to protect people's freedoms. It is un-American to regulate the private lives of US Citizens. It isn't freedom, but tyranny to have the government tell you how to live. Even hypocrites like you must be able to see that, considering how smart you think you are.
I have the right to call myself anything I want. I'm an adult and I can smoke if I decide I want to smoke too. Isn't freedom grand? Communists like you don't have any damn thing to say about. Next time, stick to the topic and leave your leftist ranting to yourself. Better yet, move to Iran. The government there like to regulate morality. I think you might be happy there.
-
08-17-2008, 06:43 PM #9bald headed old fart
Status- Offline
Join Date- Aug 2003
Location- chertsey, a small town 25 miles south west of london, england.
Posts- 739
Re: is there a diffrence between <script language="javascript> and <script type="text
Hi there cigarettes,
I am sorry that you have taken my analogy so personally.
It was never my intent to insult or judge you.
We all, and I am no exception, do and have done things, which on reflection we know to be unwise or just plain stupid.
Bad coding and smoking are just two examples that I have been guilty of in the past.
Fortunately, I have, since early adulthood, been open to constructive criticism and advise.
I would never dream of questioning your right to smoke but I am sure that even you would question the wisdom of your habit.
Anyway, I am extremely sorry that my post has caused you so much anguish.
Regards,
coothead