debugging javascript

Paul King sciguy-Ja3L+HSX0kI at public.gmane.org
Mon Sep 1 15:02:53 UTC 2008


Well, it turns out to be one of those nearly undetectable typos. I typed
"onreadystateChange" instead of "onreadystatechange", and that is why
the state was never changed. But for whatever doggone reason, Javascript
seemed to have no problem with my misspelling of the method.

It pays to download the author's code (I had to hunt for the URL), then
replace his functions for yours, and see if it breaks.

On to more sensible debugging...yes, there are still problems. For one
thing, Holzner coded his menus in such a way that you can only add a
fixed number of menu items. All items show up, but they are not
selectable.

Thanks for everyone's help, especially Ian.

Paul

On Sun, 2008-08-31 at 22:35 -0400, Ian Petersen wrote:
> Serves me right for editing code in GMail.  I sent my preceding post
> too early.  Sorry about the spam.
> 
> I think you want something like the following:
> 
> function MyMouseEvent(e) {
>   this.e = e || window.event;
> 
>   this.x = this.e.pageX || this.e.clientX;
>   this.y = this.e.pageY || this.e.clientY;
> 
>   this.target = this.e.target || this.e.srcElement;
> }
> 
> Ian
> --
> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
> .

--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list