[Dojo-interest] Loading dojo from external host

antipolizay at inbox.ru antipolizay at inbox.ru
Tue Jun 16 10:38:56 EDT 2009


I try to using dojo.addOnLoad.

Error:
Cannot convert undefined or null to Object
on string:
wipeOut = dojo.fx.wipeOut({node: "animDiv",duration: 1000});

<script type="text/javascript">
  var fadeOut;
  var fadeIn;
  var wipeOut;
  var wipeIn;

  /**
    * init
    */
  function init()
  {
    fadeOut = dojo.fadeOut({node: "animDiv",duration: 1000});
    fadeIn = dojo.fadeIn({node: "animDiv",duration: 1000});
    wipeOut = dojo.fx.wipeOut({node: "animDiv",duration: 1000});
    wipeIn = dojo.fx.wipeIn({node: "animDiv",duration: 1000});
  }

  /**
    * loader
    */
  function loader()
  {
    dojo.require("dojo.fx");
    dojo.require("dijit.dijit"); // optimize: load dijit layer
    dojo.require("dijit.form.Button");

    dojo.require("dijit.Menu");

    init();
  }

  dojo.addOnLoad(loader);
</script>



On Tuesday 16 June 2009 13:14:14 Peter Svensson wrote:
> One thing that I forgot to mention, is that when using cross-domain loading
> of Dojo, all of you JS logic must be inside a addOnLoad statement, like
> this;
> <script>
> dojo.addOnLoad/function()
> {
>   // All of your logic belongs to us :)
> }
> </script>
> 
> I think that is the cause of your error.
> 
> Cheers,
> PS
> 
> On Tue, Jun 16, 2009 at 11:10 AM, <antipolizay at inbox.ru> wrote:
> 
> > Hi!
> >
> >
> >
> > I try CDN
> > With AOL write js error:
> >
> >
> >
> > "Type mismatch (usually non-object value supplied where object required)"
> > on string
> > var wipeOut = dojo.fx.wipeOut({node: "animDiv",duration: 1000});
> >
> >
> >
> > With Google write the same.
> > With local scripts it is working fine.
> >
> >
> >
> > Also I try to build myself using fx profile from dojo site. Now I have the
> > same error as AOL ang Google
> >
> >
> >
> >
> >
> >
> > On Tuesday 16 June 2009 08:47:48 Peter Svensson wrote:
> > > Hi!
> > > You need to use the build tool in the util directory of Dojo to create a
> > > cross-domain build. See;
> > > http://docs.dojocampus.org/quickstart/cross-domain
> > >
> > > Where you'll also find a great intro to sing Google or AOL's CDN to load
> > > cross-domain Dojo from, if you don't want to host your own.
> > >
> > > Cheers,
> > > PS
> > >
> > > On Tue, Jun 16, 2009 at 6:24 AM, <antipolizay at inbox.ru> wrote:
> > >
> > > > Hi,
> > > >
> > > >
> > > > How I can load dojo scripts from external host?
> > > > dojo.require("dojo.fx") write that can't find fx.js
> > > >
> > > >
> > > > It's ok:
> > > > <script type="text/javascript" src="scripts/dojo/dojo.js"
> > > > djConfig="parseOnLoad:true, isDebug:false"></script>
> > > >
> > > >
> > > > But this does not:
> > > > <script type="text/javascript" src="http://HOST/scripts/dojo/dojo.js"
> > > > djConfig="parseOnLoad:true, isDebug:false"></script>
> > > >
> > > >
> > > > Also I try:
> > > > <script type="text/javascript" src="http://HOST/scripts/dojo/dojo.js"
> > > > djConfig="parseOnLoad:true, isDebug:false, baseUrl:'
> > > > http://HOST/scripts/dojo/'"></script>
> > > >
> > > >
> > > > Please, help me.
> > > >
> > > >
> > > > Thx
> > > >
> > > > _______________________________________________
> > > > FAQ: http://dojotoolkit.org/support/faq
> > > > Book: http://dojotoolkit.org/docs/book
> > > > Forums: http://dojotoolkit.org/forum
> > > > Dojo-interest at mail.dojotoolkit.org
> > > > http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
> > > >
> > > >
> > >
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > FAQ: http://dojotoolkit.org/support/faq
> > Book: http://dojotoolkit.org/docs/book
> > Forums: http://dojotoolkit.org/forum
> > Dojo-interest at mail.dojotoolkit.org
> > http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
> >
> >
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-interest/attachments/20090616/3b52b370/attachment.htm 


More information about the Dojo-interest mailing list