#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Location
    Chicago, ILL
    Posts
    16
    Rep Power
    0

    Javascript problem with ;


    heres my code:

    <script language="Javascript">
    <!--
    if (screen.width > 1024) {
    window.resizeTo(1024, 760);
    } << Line 9
    elseif (screen.width < 1024) {
    alert("The Page is best viewed at 1024 X 768. You may see some problems");
    }
    -->
    </script>

    It keeps telling me that it expected a ; on line 9 i don't get it...
    help...
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2002
    Location
    Norway
    Posts
    34
    Rep Power
    13
    Will this help?

    <script language="Javascript">
    <!--
    if (screen.width > 1024) {
    window.resizeTo(1024, 760);
    } << Line 9
    else if (screen.width < 1024) {
    alert("The Page is best viewed at 1024 X 768. You may see some problems");
    }
    -->
    </script>

    I divided "elseif" into two separate words.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    NJ, USA
    Posts
    91
    Rep Power
    13
    Just a word of advice. "Best viewed at ..." or "Best viewed using ... " can generate lots of hate mail.
    - Walt

    Will code for food.

IMN logo majestic logo threadwatch logo seochat tools logo