ajax call added

Ajax call now works for a single level tree.