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

D

dasayu

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
 
T

Thomas 'PointedEars' Lahn

dasayu said:
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:

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top