Results 1 to 2 of 2

Thread: entering javascript language version gives syntax error in IE8

  1. #1
    Join Date
    Jul 2010

    entering javascript language version gives syntax error in IE8

    Basically, the script is an onMouseover slideshow which works fine.

    The problem is that in internet explorer, it says there is a syntax error relating to the javascript code. (this doesn't appear on chrome or firefox)

    here is the code:

    <script language="JavaScript1.1">
    var myimages=new Array()
    var gotolink="#"
    basically, by putting the script language here, IE8 is saying there is a syntax error! removing it stops the error but stops the script from working.

    What can I do here? If I put it in an external .js file instead (right now it is in the head of the HTML page) will this solve the problem?

    P.S im a total newbie to javascript so apologies if this is a daft question

    thanks in advance

  2. #2
    Join Date
    Aug 2007
    The normal way to include JavaScript now is either by an external file or with the type attribute.
    <script src="address/of/js/file.js">
    <script type="text/javascript">
    // Your JavaScript

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center