[Proto-Scripty] Re: node.select in IE7

2008-11-14 Thread AlannY

Not works for me too ;-(

$$('div.number').each(function (node) {
var edit = node.select('a#edit')[0];
if( edit ) {
...
}
});

It works in Firefox and Safari and NOT works in IE ;-(

On Nov 14, 12:29 am, Gabriel Gilini [EMAIL PROTECTED] wrote:
 On Thu, Nov 13, 2008 at 4:17 PM, AlannY [EMAIL PROTECTED] wrote:

  Hi there. I'm working on simple script that must work on all browsers,
  which prototype supports.

  There are code:
  var edit = node.select('a#edit')[0];
  if( edit ) {
  ...
  }

 What's node?

 How to fix it?

 $(node).select(...) should probably fix it for you

 Cheers

 Gabriel Gilini

 www.usosim.com.br
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: node.select in IE7

2008-11-14 Thread AlannY

Thanks. It works. The problem is solved ;-)

On Nov 14, 12:03 pm, Mona Remlawi [EMAIL PROTECTED] wrote:
 Hi Alann,

 I believe the problem is that you are using the variable name to be
 the same as the ID of the element.
 IE tends to support referencing an element with its ID.
 Ex:
 div id=bla/div
 then 'bla' would refer to div#bla element.

 Now back to your example, do you have multiple a id=edit/a elements?
 That will cause IE to try and resolve 'edit' to a unique element with
 id=edit. When it doesn't find a unique element, it would return
 undefined.

 To resolve, change the var name, or have edit as a className (a
 class=edit/a) then (node.select('a.edit')).

 In all cases, I strongly advise to have element ids to be unique!

 hope this helps,

 --
 mona
 [EMAIL PROTECTED]

 On Fri, Nov 14, 2008 at 9:12 AM, AlannY [EMAIL PROTECTED] wrote:

  Not works for me too ;-(

  $$('div.number').each(function (node) {
     var edit = node.select('a#edit')[0];
     if( edit ) {
         ...
     }
  });

  It works in Firefox and Safari and NOT works in IE ;-(

  On Nov 14, 12:29 am, Gabriel Gilini [EMAIL PROTECTED] wrote:
  On Thu, Nov 13, 2008 at 4:17 PM, AlannY [EMAIL PROTECTED] wrote:

   Hi there. I'm working on simple script that must work on all browsers,
   which prototype supports.

   There are code:
   var edit = node.select('a#edit')[0];
   if( edit ) {
   ...
   }

  What's node?

  How to fix it?

  $(node).select(...) should probably fix it for you

  Cheers

  Gabriel Gilini

 www.usosim.com.br
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: node.select in IE7

2008-11-13 Thread Gabriel Gilini
On Thu, Nov 13, 2008 at 4:17 PM, AlannY [EMAIL PROTECTED] wrote:


 Hi there. I'm working on simple script that must work on all browsers,
 which prototype supports.

 There are code:
 var edit = node.select('a#edit')[0];
 if( edit ) {
 ...
 }


What's node?

How to fix it?


$(node).select(...) should probably fix it for you

Cheers

Gabriel Gilini

www.usosim.com.br
[EMAIL PROTECTED]
[EMAIL PROTECTED]

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---