event just stopped working

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

event just stopped working

Wayne Douglas
Why would this "just stop working"?

dojo.event.connect(document.body, "onload", "onAfterLoadHandler");

function onAfterLoad(evt){
    alert('1');
}

With an 'object doesn't support this property or method' error.

w

_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: event just stopped working

Bill Keese-2
Hmm, I don't think the function name should be in quotes.  Try this:

dojo.event.connect(document.body, "onload", onAfterLoadHandler);

(the function name is in quotes if the 4 argument version
dojo.event.connect(document.body, "onload", this, "onAfterLoadHandler");)


Wayne Douglas wrote:

> Why would this "just stop working"?
>
> dojo.event.connect(document.body, "onload", "onAfterLoadHandler");
>
> function onAfterLoad(evt){
>    alert('1');
> }
>
> With an 'object doesn't support this property or method' error.
>
> w
>
> _______________________________________________
> Dojo-interest mailing list
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: event just stopped working

Wayne Douglas
Yeah, I tried that, and it almost works, thing is, it used to work fine
until today. If I try:

dojo.event.connect(document.body, "onload", onAfterLoadHandler);

then

function onAfterLoad(evt){
   alert(evt);
}


evt is null???

w



Bill Keese wrote:

> Hmm, I don't think the function name should be in quotes.  Try this:
>
> dojo.event.connect(document.body, "onload", onAfterLoadHandler);
>
> (the function name is in quotes if the 4 argument version
> dojo.event.connect(document.body, "onload", this, "onAfterLoadHandler");)
>
>
> Wayne Douglas wrote:
>
>> Why would this "just stop working"?
>>
>> dojo.event.connect(document.body, "onload", "onAfterLoadHandler");
>>
>> function onAfterLoad(evt){
>>    alert('1');
>> }
>>
>> With an 'object doesn't support this property or method' error.
>>
>> w
>>
>> _______________________________________________
>> Dojo-interest mailing list
>> [hidden email]
>> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
> _______________________________________________
> Dojo-interest mailing list
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: event just stopped working

Alex Russell
In reply to this post by Wayne Douglas
While this is indeed vexing, you probably shouldn't be using
event.connect() to attach to onload in the first place. You're better
off registering your handler with dojo.addOnLoad() or connect()-ing to
dojo.loaded().

Regards

On Monday 12 December 2005 1:50 pm, Wayne Douglas wrote:

> Why would this "just stop working"?
>
> dojo.event.connect(document.body, "onload", "onAfterLoadHandler");
>
> function onAfterLoad(evt){
>     alert('1');
> }
>
> With an 'object doesn't support this property or method' error.
>
> w
>
> _______________________________________________
> Dojo-interest mailing list
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest

--
Alex Russell
[hidden email] BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723
[hidden email]  F687 1964 1EF6 453E 9BD0 5148 A15D 1D43 AB92 9A46
_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: event just stopped working

Bill Keese-2
In reply to this post by Wayne Douglas
Oh, like Alex said it's better to use dojo.addOnLoad().  As for the
event object, I don't know why it isn't there, but also I don't know why
you would want an event object on page load.  I think you will get an
event object for other events, like this:

dojo.event.connect(document.body, "onmousemove", onMouseMoveHandler);


Wayne Douglas wrote:

> Yeah, I tried that, and it almost works, thing is, it used to work fine
> until today. If I try:
>
> dojo.event.connect(document.body, "onload", onAfterLoadHandler);
>
> then
>
> function onAfterLoad(evt){
>   alert(evt);
> }
>
>
> evt is null???
>
> w
>
>
>
> Bill Keese wrote:
>
>> Hmm, I don't think the function name should be in quotes.  Try this:
>>
>> dojo.event.connect(document.body, "onload", onAfterLoadHandler);
>>
>> (the function name is in quotes if the 4 argument version
>> dojo.event.connect(document.body, "onload", this, "onAfterLoadHandler");)
>>
>>
>> Wayne Douglas wrote:
>>
>>> Why would this "just stop working"?
>>>
>>> dojo.event.connect(document.body, "onload", "onAfterLoadHandler");
>>>
>>> function onAfterLoad(evt){
>>>    alert('1');
>>> }
>>>
>>> With an 'object doesn't support this property or method' error.
>>>
>>> w
>>>
>>> _______________________________________________
>>> Dojo-interest mailing list
>>> [hidden email]
>>> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>>
>> _______________________________________________
>> Dojo-interest mailing list
>> [hidden email]
>> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>>
> _______________________________________________
> Dojo-interest mailing list
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: event just stopped working

Wayne Douglas
Well, I guess I am being a bit clumbsy, but the effect I am going for is
unobtrusive.

Cheers guys for the help.

w


Bill Keese wrote:

> Oh, like Alex said it's better to use dojo.addOnLoad().  As for the
> event object, I don't know why it isn't there, but also I don't know
> why you would want an event object on page load.  I think you will get
> an event object for other events, like this:
>
> dojo.event.connect(document.body, "onmousemove", onMouseMoveHandler);
>
>
> Wayne Douglas wrote:
>
>> Yeah, I tried that, and it almost works, thing is, it used to work
>> fine until today. If I try:
>>
>> dojo.event.connect(document.body, "onload", onAfterLoadHandler);
>>
>> then
>>
>> function onAfterLoad(evt){
>>   alert(evt);
>> }
>>
>>
>> evt is null???
>>
>> w
>>
>>
>>
>> Bill Keese wrote:
>>
>>> Hmm, I don't think the function name should be in quotes.  Try this:
>>>
>>> dojo.event.connect(document.body, "onload", onAfterLoadHandler);
>>>
>>> (the function name is in quotes if the 4 argument version
>>> dojo.event.connect(document.body, "onload", this,
>>> "onAfterLoadHandler");)
>>>
>>>
>>> Wayne Douglas wrote:
>>>
>>>> Why would this "just stop working"?
>>>>
>>>> dojo.event.connect(document.body, "onload", "onAfterLoadHandler");
>>>>
>>>> function onAfterLoad(evt){
>>>>    alert('1');
>>>> }
>>>>
>>>> With an 'object doesn't support this property or method' error.
>>>>
>>>> w
>>>>
>>>> _______________________________________________
>>>> Dojo-interest mailing list
>>>> [hidden email]
>>>> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>>>
>>>
>>> _______________________________________________
>>> Dojo-interest mailing list
>>> [hidden email]
>>> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>>>
>> _______________________________________________
>> Dojo-interest mailing list
>> [hidden email]
>> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
> _______________________________________________
> Dojo-interest mailing list
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: event just stopped working

David Schontzler
Can you reproduce the issue connecting to a different event? Even if
connecting to onload isn't the recommended way, this may be
highlighting some underlying issue.

-d

On 12/12/05, Wayne Douglas <[hidden email]> wrote:

> Well, I guess I am being a bit clumbsy, but the effect I am going for is
> unobtrusive.
>
> Cheers guys for the help.
>
> w
>
>
> Bill Keese wrote:
>
> > Oh, like Alex said it's better to use dojo.addOnLoad().  As for the
> > event object, I don't know why it isn't there, but also I don't know
> > why you would want an event object on page load.  I think you will get
> > an event object for other events, like this:
> >
> > dojo.event.connect(document.body, "onmousemove", onMouseMoveHandler);
> >
> >
> > Wayne Douglas wrote:
> >
> >> Yeah, I tried that, and it almost works, thing is, it used to work
> >> fine until today. If I try:
> >>
> >> dojo.event.connect(document.body, "onload", onAfterLoadHandler);
> >>
> >> then
> >>
> >> function onAfterLoad(evt){
> >>   alert(evt);
> >> }
> >>
> >>
> >> evt is null???
> >>
> >> w
> >>
> >>
> >>
> >> Bill Keese wrote:
> >>
> >>> Hmm, I don't think the function name should be in quotes.  Try this:
> >>>
> >>> dojo.event.connect(document.body, "onload", onAfterLoadHandler);
> >>>
> >>> (the function name is in quotes if the 4 argument version
> >>> dojo.event.connect(document.body, "onload", this,
> >>> "onAfterLoadHandler");)
> >>>
> >>>
> >>> Wayne Douglas wrote:
> >>>
> >>>> Why would this "just stop working"?
> >>>>
> >>>> dojo.event.connect(document.body, "onload", "onAfterLoadHandler");
> >>>>
> >>>> function onAfterLoad(evt){
> >>>>    alert('1');
> >>>> }
> >>>>
> >>>> With an 'object doesn't support this property or method' error.
> >>>>
> >>>> w
> >>>>
> >>>> _______________________________________________
> >>>> Dojo-interest mailing list
> >>>> [hidden email]
> >>>> http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >>>
> >>>
> >>> _______________________________________________
> >>> Dojo-interest mailing list
> >>> [hidden email]
> >>> http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >>>
> >> _______________________________________________
> >> Dojo-interest mailing list
> >> [hidden email]
> >> http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >
> > _______________________________________________
> > Dojo-interest mailing list
> > [hidden email]
> > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >
> _______________________________________________
> Dojo-interest mailing list
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: event just stopped working

Wayne Douglas
I think it may have been my move to Atlas the Ajax library, I cant be sure but the problem occured around the same time, leave it with me and I will do some jiggerypokery tomorrow to find out.

On 12/12/05, David Schontzler <[hidden email]> wrote:
Can you reproduce the issue connecting to a different event? Even if
connecting to onload isn't the recommended way, this may be
highlighting some underlying issue.

-d

On 12/12/05, Wayne Douglas <[hidden email]> wrote:

> Well, I guess I am being a bit clumbsy, but the effect I am going for is
> unobtrusive.
>
> Cheers guys for the help.
>
> w
>
>
> Bill Keese wrote:
>
> > Oh, like Alex said it's better to use dojo.addOnLoad().  As for the
> > event object, I don't know why it isn't there, but also I don't know
> > why you would want an event object on page load.  I think you will get
> > an event object for other events, like this:
> >
> > dojo.event.connect(document.body, "onmousemove", onMouseMoveHandler);
> >
> >
> > Wayne Douglas wrote:
> >
> >> Yeah, I tried that, and it almost works, thing is, it used to work
> >> fine until today. If I try:
> >>
> >> dojo.event.connect(document.body, "onload", onAfterLoadHandler);
> >>
> >> then
> >>
> >> function onAfterLoad(evt){
> >>   alert(evt);
> >> }

> >>
> >>
> >> evt is null???
> >>
> >> w
> >>
> >>
> >>
> >> Bill Keese wrote:
> >>
> >>> Hmm, I don't think the function name should be in quotes.  Try this:

> >>>
> >>> dojo.event.connect(document.body, "onload", onAfterLoadHandler);
> >>>
> >>> (the function name is in quotes if the 4 argument version
> >>> dojo.event.connect(document.body, "onload", this,
> >>> "onAfterLoadHandler");)
> >>>
> >>>
> >>> Wayne Douglas wrote:
> >>>
> >>>> Why would this "just stop working"?
> >>>>
> >>>> dojo.event.connect (document.body, "onload", "onAfterLoadHandler");
> >>>>
> >>>> function onAfterLoad(evt){
> >>>>    alert('1');
> >>>> }
> >>>>
> >>>> With an 'object doesn't support this property or method' error.
> >>>>
> >>>> w
> >>>>
> >>>> _______________________________________________
> >>>> Dojo-interest mailing list
> >>>> [hidden email]
> >>>> http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >>>
> >>>
> >>> _______________________________________________
> >>> Dojo-interest mailing list
> >>> [hidden email]
> >>> http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >>>
> >> _______________________________________________
> >> Dojo-interest mailing list
> >> [hidden email]
> >> http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >
> > _______________________________________________
> > Dojo-interest mailing list
> > [hidden email]
> > http://dojotoolkit.org/mailman/listinfo/dojo-interest
> >
> _______________________________________________
> Dojo-interest mailing list
> [hidden email]
> http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest


_______________________________________________
Dojo-interest mailing list
[hidden email]
http://dojotoolkit.org/mailman/listinfo/dojo-interest