[Dojo-interest] Dojo, Tree, PHP/MySql and AJAX

Steve Sobol sjsobol at JustThe.net
Thu Apr 13 12:21:29 MDT 2006


On Thu, 13 Apr 2006, henan wrote:

> 
> Hi all!
> I hope you can help me (and many others new to Dojo).
> 
> I wan't to popluate a tree with data from MySql (via PHP). It should be
> possible to:
> 1. Add new nodes and folders
> 2. Delete nodes and folders
> 3. Save to the database (either on update or on submit)

Hopefully, the current nightly will contain a PHP Tree example that I 
wrote. That'll help you with #1. For #2, check the archives as there were 
some problems that were recently fixed regarding removing Tree nodes.

If my sample didn't make it into the nightly builds yet, get it from:

http://stevesobol.com/dojo_samples/control.phps
http://stevesobol.com/dojo_samples/tree_rpc.html

and modify control.phps to do exactly what you need it to do.

For #3 - shouldn't be too hard, but what's the consensus on the best way 
to do it? dojo.io.bind() is what I was thinking...
 
> What would be great:
> 4. Dbl. click on the item name and change it, saving it to the database

Well, I don't think you can do Windows-style renaming (click on the label,
it turns into a text box and you edit it), at least not yet; but you could
pop up a Dialog, have the user type in the new name and save it.

-- 
Steve Sobol, Professional Geek ** Java/VB/VC/PHP/Perl ** Linux/*BSD/Windows
Apple Valley, CA
Resident of Southern California - 
the home of beautiful people and butt-ugly traffic jams



More information about the Dojo-interest mailing list