SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: HELP ME: Menu

Hybrid View

  1. #1
    SitePoint Enthusiast PHP_Nut's Avatar
    Join Date
    Aug 2001
    Location
    NY, USA
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HELP ME: Menu

    Code:
        var M_StartTop=StartTop,M_StartLeft=StartLeft;
    umm...this is part of a navigation script. I keep getting an error that StartTop is undefined >.< i need help.
    Ian Gordon
    PHP & MySQL coder
    "Coding is like riding a bike, with a little practice, u won't hurt urself

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    It is. undefined as far as javascript is concerned means 'without value'.
    And r-parameters must have values. So,

    var x = y;

    is illegal.

    whereas

    var x = y = 0

    is legal.

    In the following script, 'a' is undefined:
    <script>
    var x = y = 0, z = a;
    </script>

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still


Bookmarks

Posting Permissions

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