Connecting Tech Pros Worldwide Help | Site Map

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

 
LinkBack Thread Tools Search this Thread
  #1  
Old May 12th, 2006, 07:25 AM
dasayu
Guest
 
Posts: n/a
Default JavaScript eror in FireFox "no properties error" works fine in IE

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


  #2  
Old May 22nd, 2006, 01:05 PM
Thomas 'PointedEars' Lahn
Guest
 
Posts: n/a
Default Re: JavaScript eror in FireFox "no properties error" works fine in IE

dasayu wrote:
[color=blue]
> 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.[/color]

Nobody can know about your custom object, so at least you should provide
its definition when there are problems with it.
[color=blue]
> The generated link looks similar to:[/color]

Similar code does not help. Post actual code.
[color=blue]
> javascript:gridWidget['PDDStyleSection'].editColumn(3, 3,
> 'PDDSectionForm', 'pdd_link', ..)
>
> The above works fine in IE.[/color]

Maybe. Maybe you have just not take notice of a yellow icon in the
status bar. Who knows ...
[color=blue]
> The above works fine in FF when not used as an array,[/color]

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.)
[color=blue]
> for example:
> javascript:gridWidget.editColumn(3, 3, 'PDDSectionForm', 'pdd_link',
> ..)[/color]

gridWidget['PDDStyleSection'].editColumn

and

gridWidget.editColumn

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

gridWidget['PDDStyleSection'].editColumn

and
[color=blue]
> ERROR SHOWN IN VENKMAN CONSOLE:
> -----------------------------------------------------------------------
> [...] gridWidget['PDDStyleFitPOMSection'].editColumn [...][/color]

are different, too. No wonder if
[color=blue]
> [...] "gridWidget.PDDStyleFitPOMSection has no properties" [...][/color]

because if that property is not defined, the reference evaluates to
`undefined'. And `undefined', the sole value of the Undefined type,
has no properties.
[color=blue]
> Any help/pointers will greatly be appreciated.[/color]

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/
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.