[Dojo-interest] XMLHTTPTransport Error: 0, Type: unknown

Spiros Papadopoulos spap13 at googlemail.com
Mon Feb 12 13:09:36 MST 2007

Hi again,

On 12/02/07, Thomas Wolf <tw at wsf.at> wrote:
> Yes, I realized meanwhile that this was only a part of the problem ;(
> I thinke there are two problems in your code:
> 1) the bind() call works asynchronous by default, so your code doesn't
> wait for the server's response but immediately submits the form.
> 2) With your "return true/false" statements, you don't leave
> checkInputs() but just the "load: function()" - therefore checkInputs()
> always returns 'undefined'.

I thought of (2) before as well. So i had a variable set:
           var nExists; ... if(data == 'not exists') nExists = true; ...
nExists = false;
which was returned outside of bind() at the  very end of checkInputs().
However this wasn't working while asynchronous, so i changed it back.
Also, after i set the sync to true and before set the variable to be
returned outside of the load
function again it didn't work.
So Both your points above are correct and it now works!
I am new to dojo and AJAX so I wasn't well aware of sync. The rest of the
code works appropriately.

Thanks very much, honestly, I appreciate your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dojotoolkit.org/pipermail/dojo-interest/attachments/20070212/65efc30b/attachment.html

More information about the Dojo-interest mailing list