JavaScript eror in FireFox "no properties error" works fine in IE

Discussion in 'Javascript' started by dasayu, May 12, 2006.

  1. dasayu

    dasayu Guest

    Hi,
    I have a custom object called gridWidget.
    I am consistantly getting an error in FireFox when I click on an href,
    which calls a function defined on the object. The generated link looks
    similar to:

    javascript:gridWidget['PDDStyleSection'].editColumn(3, 3,
    'PDDSectionForm', 'pdd_link', ..)

    The above works fine in IE.

    The above works fine in FF when not used as an array, for example:
    javascript:gridWidget.editColumn(3, 3, 'PDDSectionForm', 'pdd_link',
    ...)



    ERROR SHOWN IN VENKMAN CONSOLE:
    -----------------------------------------------------------------------

    Exception ``TypeError: gridWidget.PDDStyleFitPOMSection has no
    properties'' thrown from function (null)() in
    <javascript:gridWidget['PDDStyleFitPOMSection'].editColumn(3, 3,
    'PDDStyleFitPOMSectionTemplateForm', 'pdd_save_pom_row_column_link',
    'PDDStyleFitPOMSection');> line 1.
    [e] message = [string] "gridWidget.PDDStyleFitPOMSection has no
    properties"
    Stopped for thrown exception.
    #0: function (null)() in
    <javascript:gridWidget['PDDStyleFitPOMSection'].editColumn(3, 3,
    'PDDStyleFitPOMSectionTemplateForm', 'pdd_save_pom_row_column_link',
    'PDDStyleFitPOMSection');> line 1
    --------------------------------------------------------------------------

    Any help/pointers will greatly be appreciated.

    Thanks,
    Shyam
     
    dasayu, May 12, 2006
    #1
    1. Advertising

  2. dasayu wrote:

    > I have a custom object called gridWidget.
    > I am consistantly getting an error in FireFox when I click on an href,
    > which calls a function defined on the object.


    Nobody can know about your custom object, so at least you should provide
    its definition when there are problems with it.

    > The generated link looks similar to:


    Similar code does not help. Post actual code.

    > javascript:gridWidget['PDDStyleSection'].editColumn(3, 3,
    > 'PDDSectionForm', 'pdd_link', ..)
    >
    > The above works fine in IE.


    Maybe. Maybe you have just not take notice of a yellow icon in the
    status bar. Who knows ...

    > The above works fine in FF when not used as an array,


    This is a bracket property accessor. Since the property name is not
    a number, this does not have anything to do with arrays. (Despite
    rumors, there are no built-in associative arrays in ECMAScript
    implementations.)

    > for example:
    > javascript:gridWidget.editColumn(3, 3, 'PDDSectionForm', 'pdd_link',
    > ..)


    gridWidget['PDDStyleSection'].editColumn

    and

    gridWidget.editColumn

    are different references (not just different property accessor syntax), and

    gridWidget['PDDStyleSection'].editColumn

    and

    > ERROR SHOWN IN VENKMAN CONSOLE:
    > -----------------------------------------------------------------------
    > [...] gridWidget['PDDStyleFitPOMSection'].editColumn [...]


    are different, too. No wonder if

    > [...] "gridWidget.PDDStyleFitPOMSection has no properties" [...]


    because if that property is not defined, the reference evaluates to
    `undefined'. And `undefined', the sole value of the Undefined type,
    has no properties.

    > Any help/pointers will greatly be appreciated.


    Furthermore, don't use `javascript:' here, see
    <URL:http://jibbering.com/faq/#FAQ4_24>


    PointedEars
    --
    http://members.ud.com/download/gold/
    http://folding.stanford.edu/
    http://alien.de/seti/
    http://setiathome.ssl.berkeley.edu/
     
    Thomas 'PointedEars' Lahn, May 22, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. surf
    Replies:
    2
    Views:
    397
    =?ISO-8859-1?Q?G=E9rard_Talbot?=
    Feb 4, 2007
  2. JDeats
    Replies:
    2
    Views:
    580
    JDeats
    Sep 11, 2007
  3. Dave
    Replies:
    9
    Views:
    184
  4. Avi
    Replies:
    1
    Views:
    124
    Martin Honnen
    Oct 24, 2005
  5. Replies:
    4
    Views:
    257
    Randy Webb
    Feb 18, 2006
Loading...

Share This Page