Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > JavaScript eror in FireFox "no properties error" works fine in IE

Reply
Thread Tools

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

 
 
dasayu
Guest
Posts: n/a
 
      05-12-2006
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

 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      05-22-2006
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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mouse whell won't scroll in ie7 or excel...works fine in firefox kmwgrace@gmail.com Computer Support 7 02-25-2008 07:15 PM
AJAX app will not make call on Safari and FireFox, works fine on Internet Explorer, any ideas? JDeats ASP .Net 2 09-11-2007 10:20 PM
need help with CSS menu(works fine in firefox) surf HTML 2 02-04-2007 10:47 PM
JavaScript not working in IE and Safari, works in Firefox fine. dpodkuik@gmail.com Javascript 4 02-18-2006 12:51 AM
ebay.co.uk - incorrect link with Firefox - works fine with IE or manually-typed address no-name Computer Support 4 07-29-2004 05:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57