[Dojo-interest] newbie + non-dojo-ajax and widgets
Gert van Spijker
gert at ab-graph.com
Fri Sep 1 02:27:33 MDT 2006
Instead of setting the innerHTML of the div, call
dojo.widget.createWidget. Also, instead of generating the html fragments
for innHTML, generate a JSON object on the server side with arguments
for the createWidget function. This is what I am doing in my current
project and it works very well.
Dean Karres wrote:
>This newbie is back again. We currently have an ajax'd app tat is 80%
>complete. We are looking at Dojo for the rich widget set. One of
>our general questions is: will it be better to re-write everything
>on top of Dojo or just pick and choose from the widgets we want?
>In trying to answer that question I have tried a test. We are using
>CGI::Perl [aka Perljax] for the ajax layer. We draw a "base page"
>that has lots of controls on it and then make use of various onClick
>and other events to trigger all that ajax goodness.
>The test I just tried was to create a simple div and have its onClick
>event [via CGI::Ajax] call a perl function that returns the innerHTML
>content that would generate a Dojo floating pane.
>Result: the perl function is called and the innerHTML info is
>generated and returned but it seems that Dojo never becomes aware of
>the new widget.
>I can imagine creating the floating pane in the initial base page
>as long as I can keep its visibility "hidden" or display of "none"
>and then have it appear with the onClick... I have not found out how
>to create the pane invisibly yet though nor do I know what control
>to set to trigger the visibility with the onClick.
>I can dig that I might be grossly abusing the widgets in this fashion.
>Am I? Is creating/using Dojo widgets possible through a third party
>I will supply a link to this test if you need.
>Dojo FAQ: http://dojo.jot.com/FAQ
>Dojo Book: http://manual.dojotoolkit.org/DojoDotBook
>Dojo-interest at dojotoolkit.org
More information about the Dojo-interest