object problems

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • john

    #1

    object problems

    im fairly new to objects and javascript but I have an object coded as

    =============== =============== ====
    899:function class_object(st atus, comment, class)
    900: {
    901: this.status = status;
    902: this.comment = comment;
    903: this.class = class;
    904: }
    =============== =============== ====

    but keep getting this error message

    =============== =============== ====
    line : 899
    char : 40
    error : expected identifier
    code : o
    url : mypage.html
    =============== =============== ====

    any ideas of why this is happening,

    thanks john
  • KC Wong

    #2
    Re: object problems

    > im fairly new to objects and javascript but I have an object coded as[color=blue]
    >
    > =============== =============== ====
    > 899:function class_object(st atus, comment, class)
    > 900: {
    > 901: this.status = status;
    > 902: this.comment = comment;
    > 903: this.class = class;
    > 904: }
    > =============== =============== ====
    >
    > but keep getting this error message
    >
    > =============== =============== ====
    > line : 899
    > char : 40
    > error : expected identifier
    > code : o
    > url : mypage.html
    > =============== =============== ====[/color]

    "class" is a reserved word in JavaScript. Use another name?


    KC


    Comment

    Working...