I did this code : var name = elem.id + "Menu"; alert("'" + name + "'"); var menu = $(name); alert(menu); try { menu.absolutize(); } catch (e) { alert(e.message) };
and the alerts I got are : 1. 'aboutMenu' 2. [Object] 3. 'element' is undefined On Tue, Jun 1, 2010 at 2:34 PM, T.J. Crowder <t...@crowdersoftware.com> wrote: > Hi, > > What do you see for the `alert(menu);`? Because the simplest > explanation is that there's no item with the ID you're creating in > `var menu = $(elem.id + "Menu");` > > In the try..catch, you'll get more information if you do this: > > catch (e) { > alert(e.message ? e.message : String(e)); > } > > ...because IE usually (always?) throws objects with a `message` > property when throwing errors. > > HTH, > -- > T.J. Crowder > Independent Software Consultant > tj / crowder software / com > www.crowdersoftware.com > > On Jun 1, 11:15 am, Ran Berenfeld <berenfeld...@gmail.com> wrote: > > It says "Object Error" > > > > > > > > On Tue, Jun 1, 2010 at 12:34 PM, Johan Arensman <johanm...@gmail.com> > wrote: > > > You could try 'try/catching' the code: > > > > > replace your menu.absolutize(); with: > > > > > try { > > > menu.absolutize(); > > > } catch(e) { alert(e); } > > > > > What does the error message tell you? > > > > > On Tue, Jun 1, 2010 at 11:12 AM, Ran Berenfeld <berenfeld...@gmail.com > >wrote: > > > > >> Hello > > > > >> I'm trying Prototype 1.7 RC 2 and I have a problem > > >> this is the code that is running : > > > > >> $$("li.horizontal").each( function(elem) { > > >> elem.observe("mouseover", subMenuShow); > > >> var menu = $(elem.id + "Menu"); > > >> alert(menu); > > >> alert("1"); > > >> menu.absolutize(); > > >> alert("2"); > > > > >> In chrome it works, however in IE 7.0 I see the alert("1") but I fail > to > > >> see the alert("2") > > >> can you please tell me what is the problem ? > > > > >> Thanks > > >> Ran > > > > >> -- > > >> 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-scriptacul...@googlegroups.com. > > >> To unsubscribe from this group, send email to > > >> prototype-scriptaculous+unsubscr...@googlegroups.com<prototype-scriptaculous%2bunsubscr...@googlegroups.com><prototype-scriptaculou > s%2bunsubscr...@googlegroups.com <s%252bunsubscr...@googlegroups.com>> > > >> . > > >> For more options, visit this group at > > >>http://groups.google.com/group/prototype-scriptaculous?hl=en. > > > > > -- > > > 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-scriptacul...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > prototype-scriptaculous+unsubscr...@googlegroups.com<prototype-scriptaculous%2bunsubscr...@googlegroups.com><prototype-scriptaculou > s%2bunsubscr...@googlegroups.com <s%252bunsubscr...@googlegroups.com>> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/prototype-scriptaculous?hl=en. > > -- > 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-scriptacul...@googlegroups.com. > To unsubscribe from this group, send email to > prototype-scriptaculous+unsubscr...@googlegroups.com<prototype-scriptaculous%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/prototype-scriptaculous?hl=en. > > -- 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-scriptacul...@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.