[Proto-Scripty] Re: FF throws an error saying $('note_cursor') has no properties.

2009-01-16 Thread T.J. Crowder

Hi,

Can you post a minimal but complete example demonstrating the
problem?  That code is fine (it assumes the element will exist, but
sometimes that's a safe[ish] assumption, and of course $() _does_ work
correctly on Firefox.  So it'll be something about the page structure,
when this is being done (inline or in an event), etc.
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Jan 16, 8:33 am, Felcita Edwin felcita.rajakum...@gmail.com
wrote:
 When i try to run a sample to understand how prototype.js works i see
 a problem with Fire Fox. Following is the code

 var d = $('note_cursor');
 d.addClassName('active');

 FF throws an error saying $('note_cursor') has no properties.

 While this works fine in IE6.

 Can any one please help to debug this.

 Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: FF throws an error saying $('note_cursor') has no properties.

2009-01-16 Thread Tom

Whoops -- that should have said
In InternetExplorer getElementById incorrectly returns elements based
on the name attribute as well as the id attribute.

On Jan 16, 10:47 am, Tom twalp...@gmail.com wrote:
 Since the code thats failing is so simple, I'm going to guess that
 'note_cursor' is actually the name of an element in your document and
 not its id.   getElementById (which $ calls) incorrectly returns
 elements based on the name attribute as well as the id attribute.
 Because of this if in your document you have
 input name='note_cursor'    then $('note_cursor') will return
 the input element in IE6 but in FF it will not.

 On Jan 16, 12:33 am, Felcita Edwin felcita.rajakum...@gmail.com
 wrote:

  When i try to run a sample to understand how prototype.js works i see
  a problem with Fire Fox. Following is the code

  var d = $('note_cursor');
  d.addClassName('active');

  FF throws an error saying $('note_cursor') has no properties.

  While this works fine in IE6.

  Can any one please help to debug this.

  Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: FF throws an error saying $('note_cursor') has no properties.

2009-01-16 Thread Felcita Rajakumari
Thanks guys for your replies..

I got the problem resolved.

It was because the function was being called before the DOM gets loaded.

Thanks again!!

Felcita

On Sat, Jan 17, 2009 at 12:19 AM, Tom twalp...@gmail.com wrote:


 Whoops -- that should have said
 In InternetExplorer getElementById incorrectly returns elements based
 on the name attribute as well as the id attribute.

 On Jan 16, 10:47 am, Tom twalp...@gmail.com wrote:
  Since the code thats failing is so simple, I'm going to guess that
  'note_cursor' is actually the name of an element in your document and
  not its id.   getElementById (which $ calls) incorrectly returns
  elements based on the name attribute as well as the id attribute.
  Because of this if in your document you have
  input name='note_cursor'    then $('note_cursor') will return
  the input element in IE6 but in FF it will not.
 
  On Jan 16, 12:33 am, Felcita Edwin felcita.rajakum...@gmail.com
  wrote:
 
   When i try to run a sample to understand how prototype.js works i see
   a problem with Fire Fox. Following is the code
 
   var d = $('note_cursor');
   d.addClassName('active');
 
   FF throws an error saying $('note_cursor') has no properties.
 
   While this works fine in IE6.
 
   Can any one please help to debug this.
 
   Thanks
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---