#1
  1. a lazy guy
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2001
    Location
    Hong Kong
    Posts
    99
    Rep Power
    14

    Question IE5 Javascript Problem


    Hi Guyz,

    I got a strange Javascript problem under IE5, the script works fine in all other browser.

    here is my code:

    <HTML>
    <HEAD>
    <SCRIPT language="Javascript" SRC="myFile.js"></SCRIPT>
    <SCRIPT language="Javascript" >
    alert("hello")
    </SCRIPT>
    </HEAD>
    </HTML>

    Inside 'MyFile.js':
    ---------------------------------------
    alert("Hey");
    function test1()
    {
    return;
    }
    ----------------------------------------


    The above code only alert the word 'Hey' on screen. The code suppose to alert 'Hello' too. But it didnt. And there is no report on script error.

    if I remark '<SCRIPT language="Javascript" SRC="myFile.js"></SCRIPT>' by <!-- and -->, the browse alert the word 'Hello' for me.


    Anyone got a solution for it? This problem seem only exist on IE5, I tested it on two different pc with IE5 installed.
    IE 5.5 works fine with it.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Location
    Dublin
    Posts
    413
    Rep Power
    14
    is it the missing semicolon?

IMN logo majestic logo threadwatch logo seochat tools logo