[Dojo-interest] new to dojo, error on dojo.io.bind

James Burke jburke at dojotoolkit.org
Tue Nov 21 15:11:04 MST 2006


On 11/21/06, Thies Edeling <thies at rrm.net> wrote:
>
> >>     function editDepartment(editId)
> >>     {
> >>         dojo.io.bind({
> >>                        url: 'getUserDepartment.do',
> >>                        handler: departmentReceived,
> >>                        error: err,
> >>                        content: {departmentId: editId}
> >>                     });
> >>     }
> >>
> >> The request ends up at my server and it returns valid XML however the
> >> error method is always called with type error. In firebug the real error
> >> is 'dojo is not defined' on line 2757. Anyone with clues? Dojo seems
> >> interesting if it works :)
> >>
> >> gr
> >> Thies
> >
> > Try using handle: instead of handler: in the bind arguments.
> >
> No luck, I'm getting the same error. What's the diff between handle &
> handler ?

I don't believe "handler" is an actual valid parameter name, the code
looks for "handle".

You can compare your test with this unit test file from the nightly
code (and watch the HTTP traffic back and forth to see if there are
any differences with content types and such):
http://archive.dojotoolkit.org/nightly/tests/io/test_BrowserIO.frag.html

That test uses "load" for the callback parameter, but "handle" should
work just as well.

James


More information about the Dojo-interest mailing list