Ajax data - Dynamic load

102 views
Skip to first unread message

Rach

unread,
Jun 26, 2009, 6:56:37 AM6/26/09
to JavaScript Information Visualization Toolkit, rachit...@ml.com
I'm trying to ajaxify the load of the SpaceTree. When the page loads I
use jQuery to fetch the data (ASP.Net Web Service) and it loads 3
levels. (Start Page --> Home Page --> Next 3 Pages).

I'm not getting any further with this. When I click on any Node at 3rd
level, how do I make changes to the original JIT script so that I can
load the data for next Node? I tried to change the onClick event but
there's no way to refresh the "json" variable it seems.

Anybody tried this? Any example?

Nico Garcia Belmonte

unread,
Jun 26, 2009, 7:58:05 AM6/26/09
to javascript-information...@googlegroups.com
You can ajaxify you viz by implementing the "request" controller
method with an ajax call.
That method is triggered when a node is clicked and the viz needs to
load more data (to show its children for example).

Here's an example that makes use of the request method:

http://thejit.org/Jit/Examples/Spacetree/example2.html

The code is here, take a look at the request method implementation,
you should replace the existing code for an ajax call there:

http://thejit.org/Jit/Examples/Spacetree/example2.code.html

Hope it helps,
--
I would never die for my beliefs because I might be wrong.

Bertrand Russell

Rach

unread,
Jun 29, 2009, 10:40:10 PM6/29/09
to JavaScript Information Visualization Toolkit
Thanks Nico, that works great!
Reply all
Reply to author
Forward
0 new messages