|
I think this has been asked before, but I can’t seem
to make it work. I’d like to load Dojo on my top frame, and use each
child to reference and use it. In the top I have <script src=”dojo.js”>,
and in the frame, I have <script>dojo=window.parent.dojo</script>.
I can run it, alert(dojo.version) works, but widgets don’t seem to be
getting parsed on the page. Am I missing something? TIA _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook [hidden email] http://dojotoolkit.org/mailman/listinfo/dojo-interest |
|
On 3/14/07, Leitch, Oblio <[hidden email]> wrote:
> > I think this has been asked before, but I can't seem to make it work. I'd > like to load Dojo on my top frame, and use each child to reference and use > it. In the top I have <script src="dojo.js">, and in the frame, I have > <script>dojo=window.parent.dojo</script>. I can run it, alert(dojo.version) > works, but widgets don't seem to be getting parsed on the page. Am I > missing something? This is not recommended or a supported. While some things may appear to work, other subtle things will not and you will likely end up with odd, strange bugs. James _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook [hidden email] http://dojotoolkit.org/mailman/listinfo/dojo-interest |
|
So, when dealing with frames, I have to load the entire engine in every
frame I want to use it in? Seems a little heavy for just a couple of widgets. Are there any plans to make the engine a little more multi-threaded? -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of James Burke Sent: Wednesday, March 14, 2007 1:37 PM To: [hidden email] Subject: Re: [Dojo-interest] dojo with frames On 3/14/07, Leitch, Oblio <[hidden email]> wrote: > > I think this has been asked before, but I can't seem to make it work. I'd > like to load Dojo on my top frame, and use each child to reference and use > it. In the top I have <script src="dojo.js">, and in the frame, I have > <script>dojo=window.parent.dojo</script>. I can run it, alert(dojo.version) > works, but widgets don't seem to be getting parsed on the page. Am I > missing something? This is not recommended or a supported. While some things may appear to work, other subtle things will not and you will likely end up with odd, strange bugs. James _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook [hidden email] http://dojotoolkit.org/mailman/listinfo/dojo-interest This email message may contain privileged and/or confidential information. If you are not the intended recipient(s), you are hereby notified that any dissemination, distribution, or copying of this email message is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this email message from your computer. _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook [hidden email] http://dojotoolkit.org/mailman/listinfo/dojo-interest |
|
On 3/14/07, Leitch, Oblio <[hidden email]> wrote:
> So, when dealing with frames, I have to load the entire engine in every > frame I want to use it in? Seems a little heavy for just a couple of > widgets. Correct. The other option you have is to not use an iframe and instead use a dojo.widget.ContentPane to load the content you want in the iframe. > Are there any plans to make the engine a little more > multi-threaded? No, multi-threaded support is not really available for JavaScript. The widget parsing speed and general peformance should be better in Dojo 0.9. James _______________________________________________ Dojo FAQ: http://dojo.jot.com/FAQ Dojo Book: http://manual.dojotoolkit.org/DojoDotBook [hidden email] http://dojotoolkit.org/mailman/listinfo/dojo-interest |
|
In reply to this post by Leitch, Oblio
I am not a dojo or JS expert (I have probably been using it less time than you), but... I think the issue is that dojo needs to be loaded into each window/frame so that after the page has been loaded (onLoad) dojo can initialize itself in that window, analyze the page DOM (parse widgets), performing any conversions and creating data structure in the new namespace. You can reach across windows/frames with good ol' JS into other name spaces and access data or even call functions (e.g. parent.frames[0].foobar or opener.foobar()), but that's not the same. Iframes must be different. I guess they inherit the namespace from their parent? Not sure. Maybe someone who actually knows what they are talking about can answer. I guess the true dojo answer here would be "don't use frames, use a SplitContainer..." Dave Wolfe/Portland/IBM (dwolfe@...) "A good composer does not imitate; he steals." - Igor Stravinsky
I think this has been asked before, but I can’t seem to make it work. I’d like to load Dojo on my top frame, and use each child to reference and use it. In the top I have <script src=”dojo.js”>, and in the frame, I have <script>dojo=window.parent.dojo</script>. I can run it, alert(dojo.version) works, but widgets don’t seem to be getting parsed on the page. Am I missing something? TIA This email message may contain privileged and/or confidential
information. If you are not the intended recipient(s), you are hereby notified
that any dissemination, distribution, or copying of this email message
is strictly prohibited. If you have received this message in error, please
immediately notify the sender and delete this email message from your computer.
_______________________________________________
|
| Powered by Nabble | Edit this page |
