Swapping Data Sets

6 views
Skip to first unread message

Boof

unread,
Sep 7, 2011, 12:46:47 PM9/7/11
to SIMILE Widgets
How would one load a new set of data while keeping the various filter
settings. For example, consider the US Presidents example:

http://simile-widgets.org/exhibit/examples/presidents/presidents.html

If I wanted to have 4 separate data sets (1700s, 1800s, 1900s, 2000s),
I would like the user to click on a century button and load that set
of data, but keep all current filters.

Or, is there a better way to break up data? I have a couple thousand
items of information I would like to display but I would like to break
it up for performance reasons.

Axel Hecht

unread,
Sep 8, 2011, 8:05:37 AM9/8/11
to simile-...@googlegroups.com
I have a bookmarklet that I use to reload just the data, which you should be able to adapt:

javascript:(function(){exhibit.getDatabase().removeAllStatements();exhibit.getDatabase().loadDataLinks(function(){})})()

You probably want to tweak your data links before running that.

Axel

2011/9/7 Boof <corpo...@valethics.com>

--
You received this message because you are subscribed to the Google Groups "SIMILE Widgets" group.
To post to this group, send email to simile-...@googlegroups.com.
To unsubscribe from this group, send email to simile-widget...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simile-widgets?hl=en.


Boof

unread,
Sep 8, 2011, 6:20:14 PM9/8/11
to SIMILE Widgets
Axel, I really appreciate that and I'm sure it is quite helpful. I'd
like to pursue it but I'm not much of a coder. I'm amazed that I've
been able to do this at all. It's a credit to all the developers.

I have this:

<link rel="exhibit/data" href="set1.js" type="application/json" />

and would love to load set2.js instead. How to do this with your
bookmarklet idea?


On Sep 8, 8:05 am, Axel Hecht <l10n....@googlemail.com> wrote:
> I have a bookmarklet that I use to reload just the data, which you should be
> able to adapt:
>
> javascript:(function(){exhibit.getDatabase().removeAllStatements();exhibit.­getDatabase().loadDataLinks(function(){})})()
>
> You probably want to tweak your data links before running that.
>
> Axel
>
> 2011/9/7 Boof <corpora...@valethics.com>> How would one load a new set of data while keeping the various filter
Reply all
Reply to author
Forward
0 new messages