[Dojo-interest] LinkPane src contains javascript but doesn't work

Fredrik Johansson fredrik at mumme.se
Mon Dec 11 14:10:17 MST 2006


Hi,
executeScripts="true" AND scriptSeparation="false"

You can read about it here:
http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book29

/ Fredrik

måndag 11 december 2006 21:16 skrev Corey Ferguson:
> Hey Karl,
>
> I tried using this executeScripts="true" attribute, however it only
> half-worked for me.
>
> Anything I have in <script> tags will be executed. I tested just putting an
> alert('here') inside script tags.  The alert popped up!  However, I have a
> function dosomething() { alert('hi'); } inside script tags... I also have a
> <div onclick="dosomething();">Click me</div> but it will not properly hit
> that function.
>
> Here's the code to help this make more sense...
>
> index.html
> <html>
> <head>
>
> <title> Testing executeScripts="true" </title>
>
> <script type="text/javascript" src="dojo/dojo.js"></script>
> <script type="text/javascript">
>     dojo.require("dojo.widget.TabContainer");
> </script>
>
> </head>
> <body>
>
> <div dojoType="TabContainer" style="height: 100%;">
>     <div dojoType="ContentPane" href="test.html" label="Test"
> style="padding: 10px;" executeScripts="true"></div>
> </div>
>
> </body>
> </html>
>
> test.html
> <html>
> <head>
> <script>
> function dosomething() {
>     alert('here');
> }
> </script>
> </head>
>
> <body>
>
> <div style="cursor: pointer; background: #cccccc;"
> onclick="dosomething()">omg</div>
>
> </body>
> </html>
>
>
>
> executeScripts="true"
>
> On 12/10/06, Corey Ferguson <corey.t.ferguson at gmail.com> wrote:
> > I have a TabContainer with several LinkPane items under it with external
> > sources (<div dojoType="LinkPane" href="TransactionHistory.html"
> > label="Transaction History"></div>).  The TransactionHistory.html file
> > contains javascript functions.  Calling these functions from inside the
> > TransactionHistory.html page does not work.  Does this mean that ALL my
> > javascript functions have to be included in the main page holding the
> > TabContainer?  Does dojo handle this situation?
> >
> > I found a way to load this javascript dynamically (
> > http://www.codehouse.com/javascript/articles/external/) but before I did
> > all this gruntwork I wanted to make sure dojo doesn't already handle this
> > situation.


More information about the Dojo-interest mailing list