[Proto-Scripty] Re: Problem with absolutize()

2010-06-01 Thread T.J. Crowder
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.comwrote:

  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.comprototype-scriptaculou
   s%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.comprototype-scriptaculou 
  s%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.



Re: [Proto-Scripty] Re: Problem with absolutize()

2010-06-01 Thread Johan Arensman
Ah good one T.J. forgot that IE didn't show pretty errors :-)

On Tue, Jun 1, 2010 at 1: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.comprototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-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.comprototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-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.comprototype-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.



Re: [Proto-Scripty] Re: Problem with absolutize()

2010-06-01 Thread Ran Berenfeld
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.comprototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-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.comprototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-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.comprototype-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.



[Proto-Scripty] Re: Problem with absolutize()

2010-06-01 Thread T.J. Crowder
Hi,

That sound suspiciously like a bug. Can you post a complete,
_minimalist_, self-contained test page[1] demonstrating it?

[1] http://proto-scripty.wikidot.com/self-contained-test-page
--
T.J. Crowder
Independent Software Consultant
tj / crowder software / com
www.crowdersoftware.com


On Jun 1, 7:37 pm, Ran Berenfeld berenfeld...@gmail.com wrote:
 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.comprototype-scriptaculou
 s%2bunsubscr...@googlegroups.comprototype-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.comprototype-scriptaculou
 s%2bunsubscr...@googlegroups.comprototype-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.comprototype-scriptaculou 
  s%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.



Re: [Proto-Scripty] Re: Problem with absolutize()

2010-06-01 Thread Ran Berenfeld
I tried to make a simple page doing exactly the same thing and it worked ...
I will re-try again later. maybe something is wrong in my js/html


On Wed, Jun 2, 2010 at 1:42 AM, T.J. Crowder t...@crowdersoftware.com wrote:

 Hi,

 That sound suspiciously like a bug. Can you post a complete,
 _minimalist_, self-contained test page[1] demonstrating it?

 [1] http://proto-scripty.wikidot.com/self-contained-test-page
 --
 T.J. Crowder
 Independent Software Consultant
 tj / crowder software / com
 www.crowdersoftware.com


 On Jun 1, 7:37 pm, Ran Berenfeld berenfeld...@gmail.com wrote:
  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.comprototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculou
 s%2bunsubscr...@googlegroups.com s%252bunsubscr...@googlegroups.com
 prototype-scriptaculou
   s%2bunsubscr...@googlegroups.com s%252bunsubscr...@googlegroups.com
 s%252bunsubscr...@googlegroups.com s%25252bunsubscr...@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.comprototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-scriptaculou
 s%2bunsubscr...@googlegroups.com s%252bunsubscr...@googlegroups.com
 prototype-scriptaculou
   s%2bunsubscr...@googlegroups.com s%252bunsubscr...@googlegroups.com
 s%252bunsubscr...@googlegroups.com s%25252bunsubscr...@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.comprototype-scriptaculous%2bunsubscr...@googlegroups.comprototype-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.comprototype-scriptaculous%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at