[Dojo-interest] Dojo from static server

cary ho caryho at hotmail.com
Thu Feb 15 08:49:37 MST 2007


Hey James,

Great work on this xdomain stuff, i downloaded the xdomain compile. I was 
not able to get it working, is it because of my basescript URI?

The ${staticServer} is a JSTL that gets the static location 
(http://localhost:81)

<script type="text/javascript">
  djConfig = {  baseScriptUri: "${staticServer}/js/dojo/",
				useXDomain: true,
				xdWaitSeconds: 10,
				parseWidgets: false,
				searchIds: [] };
</script>
<script type="text/javascript" 
src="${staticServer}/js/dojo/dojo.js"></script>
<script type="text/javascript">
	 dojo.setModulePrefix("dojo", "${staticServer}/js/dojo/src");
	 dojo.require("dojo.widget.Tooltip");
	 dojo.require("dojo.widget.DatePicker");
	 dojo.require("dojo.widget.Dialog");
  	 dojo.addOnLoad(function n(){});
</script>

From: "James Burke" <jburke at dojotoolkit.org>
Reply-To: dojo-interest at dojotoolkit.org
To: dojo-interest at dojotoolkit.org
Subject: Re: [Dojo-interest] Dojo from static server
Date: Wed, 14 Feb 2007 22:16:22 -0800

You can look at using an xdomain build of Dojo
(http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book48) to get
around this problem, but I would wait for 0.4.2 before trying it,
since the xdomain usage has lots of enhancements.

James

On 2/14/07, cary ho <caryho at hotmail.com> wrote:
>ok, I see.
>
>The main dynamic stuff is jboss from localhost:80 and the static stuff is
>IIS at localhost:81. So if my pages from localhost:80 call dojo from
>localhost:81 and dojo tried to initialize its files, itll bomb because of
>browser security? Thats the jist im getting, that right?
>
>Thanks guys, idnt never have figured that one out.
>
>
>From: "James Burke" <jburke at dojotoolkit.org>
>Reply-To: dojo-interest at dojotoolkit.org
>To: dojo-interest at dojotoolkit.org
>Subject: Re: [Dojo-interest] Dojo from static server
>Date: Wed, 14 Feb 2007 20:30:08 -0800
>
>On 2/14/07, cary ho <caryho at hotmail.com> wrote:
> >hi,
> >
> >I have a jsp page that was using dojo fine.
> >
> ><script type="text/javascript" src="/js/dojo/dojo.js"></script>
> ><script type="text/javascript">
> >         dojo.require("dojo.widget.*");
> ></script>
> >
> >it worked fine until all the stuff went to a static server.
> >
> ><script type="text/javascript"
> >src="$http://localhost:81/static/js/dojo/dojo.js"></script>
> ><script type="text/javascript">
> >         dojo.require("dojo.widget.*");
> ></script>
> >
> >Now i get an error that says:
> >
> >symbol 'dojo.widget' is not defined after loading '__package__.js'
> >
> >Anyone have any clue whats going on? The dojo.js script is in the webpage
> >when I view the source  in a browser.
>
>Unless your page is also being served from localhost:81, this is not
>allowed by the browser security module, since in normal Dojo builds,
>modules like dojo.widget are loaded using XMLHttpRequests and those
>can only be made to the same domain and port as the page.
>
>James
>_______________________________________________
>Dojo FAQ: http://dojo.jot.com/FAQ
>Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
>Dojo-interest at dojotoolkit.org
>http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
>_________________________________________________________________
>FREE online classifieds from Windows Live Expo – buy and sell with people
>you know
>http://clk.atdmt.com/MSN/go/msnnkwex0010000001msn/direct/01/?href=http://expo.live.com?s_cid=Hotmail_tagline_12/06
>
>_______________________________________________
>Dojo FAQ: http://dojo.jot.com/FAQ
>Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
>Dojo-interest at dojotoolkit.org
>http://dojotoolkit.org/mailman/listinfo/dojo-interest
>
_______________________________________________
Dojo FAQ: http://dojo.jot.com/FAQ
Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
Dojo-interest at dojotoolkit.org
http://dojotoolkit.org/mailman/listinfo/dojo-interest

_________________________________________________________________
Search for grocery stores. Find gratitude. Turn a simple search into 
something more. 
http://click4thecause.live.com/search/charity/default.aspx?source=hmemtagline_gratitude&FORM=WLMTAG



More information about the Dojo-interest mailing list