Thursday, March 16, 2006

Dojo Toolkit as my DHTML Library

A month ago, I was looking for various DHTML Library for my office project. I have define 3 DHTML groups which on my radar. Finally, none of them is fit with my requirements. Then, I saw on Mochikit mailinglist, many mochikit users take dojo toolkit as their DHTML Library.

Dojo is still on beta version, but please dont ignore it, even if this is beta version, it work quite good. You may take a look at TurboAJAX site, they provide many tools build on top of Dojo Toolkit. They are an awesome product.

So, After collecting many information from mochikit mailinglist, I can able to make dojo and mochikit work together. Heres the sample code on one of my page

< type="text/javascript" src="http://localhost/js/mochikit/MochiKit.js">< / script >
< type="text/javascript" src="http://localhost/js/dojo022/dojo.js">< / script >
< type="text/javascript" src="http://localhost/js/dojo022/src/widget/TabPane.js"> < / script >
< type="text/javascript" src="http://localhost/js/inventories.js">< / script >

< type="text/javascript">

//initialize dojo
dojo.require("dojo.widget.ContentPane");

function qc_search()
{ alert("masuk sini");
doc_manager = new DOCManager("order_response", "qc_search");
alert("initialize");


That all part of my code. As you can see, we have to load mochikit before dojo. If not then we have to mention mochikit function completly which was ugly to do.

No comments: