47 users online (1 members and 46 guests)  


  Results 1 to 9 of 9

Related

  1. adsense javascript in php "print"    Forum: Google Adsense
    Replies: 4
  2. add "human input" code to existing script    Forum: CGI Perl Forum
    Replies: 0
  3. Replies: 1
  4. Replies: 1
  5. Javascript - Convert int to char (1 -> "001")    Forum: Javascript Forum
    Replies: 1
  1. #1
    orisma's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jun 2004
    Location
    london, England
    Posts
    34

    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

  2. #2
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732
    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

  3. #3
    orisma's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jun 2004
    Location
    london, England
    Posts
    34

    thanks

    thanks

  4. #4
    cigarettes's Avatar
    New User

    Status
    Offline
    Join Date
    Jun 2008
    Posts
    3

    Re: is there a diffrence between <script language="javascript> and <script type="text

    Quote Originally Posted by coothead View Post
    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
    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>

    ----------

  5. #5
    Panda's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2008
    Posts
    1

    Re: is there a diffrence between <script language="javascript> and <script type="text

    That's Symantec AntiVirus adding all that crap.

  6. #6
    cigarettes's Avatar
    New User

    Status
    Offline
    Join Date
    Jun 2008
    Posts
    3

    Re: is there a diffrence between <script language="javascript> and <script type="text

    Quote Originally Posted by Panda View Post
    That's Symantec AntiVirus adding all that crap.
    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?

  7. #7
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    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?
    Because language="javascript" is deprecated does not mean that it will not work.
    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?
    Think of it like your name.
    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:-

    coothead

  8. #8
    cigarettes's Avatar
    New User

    Status
    Offline
    Join Date
    Jun 2008
    Posts
    3

    Angry 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.

  9. #9
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    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