[Dojo-interest] Problem with dojo.io.bind

Peter Childs peterachilds at gmail.com
Thu Feb 15 03:52:41 MST 2007


After a bit of trial and error try this... I was trying to get this
working myself.

On 15/02/07, dhendy ferdian <ferdi2shoes at gmail.com> wrote:
> PROBLEM WITH dojo.io.bind execute scripts
> =========================================
>
> I have tried dojo.io.bind to load a page with some javascript in it,
> but the Javascript cannot be executed when the page loaded.
> How do I force the Javascript to be executed ?
>
> there is part of my script :
>
>   <script page1>
>       <script>
>               var self = this;
>
>               var kw = {
>                   url:
> "ws.php?type=ajax&method=get&"+param,
>                   content:    { inline: "yes" },
>                   formNode:    dojo.byId("form"),

mimetype: "text/json",

>                    load:        function(type, data)    {

                             var object = data;

>                           },
>                   error:        function(type, error)    {
> alert(String(type) + "\n" + String(error)); },
>                   method:        "GET"
>               };
>
>               dojo.io.bind(kw);
>           </script>
>           <body>
>               // some html here ...
>                // that execute io.bind script to load new page
>              </body>
>   <end of part script page1>
>
>
>
>   <page that to be loaded>
>           //"ws.php?type=ajax&method=get&+param"
>
>           <script>
>               function callMe(){
>                   alert('hello ....!!!!');
>               }
>           </script>
>
>           <body>
>                <label>Test Page load some javascript</label>
>               <br />
>               <input type="button" onClick="callMe();" />
>           </body>
>   <end of part page that to be loaded>
>
> actually the page can be loaded successfully
> but function "callMe()" cannot be execute
> if I load that page from dojo.io.bind
>
> can anybody help to resolve my problem, or give me suggest
>
> Thank You....
>
> Best Regards
> Dhendy Ferdian
> R&D Staff of Malaka9
> West Java - Indonesia
>
> _______________________________________________
> 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
>
>

Hope that helps, You'll need to mess around to get it to do exactly
what you want.


Peter.


More information about the Dojo-interest mailing list