JH, thanks for the HTML code!
The reason I asked for URLs rather than cut-and-paste code is because
with URLs, I can "run" your timeline live in my own browser and watch
for problems reported by debugging tools. This is an easier way to debug
than just reading code. Note that with URLs to your timeline, I can also
see the code whenever I want.
The problem might actually reside in your XML file, not just your HTML
code. For example, if your XML file looks like this
<data date-time-format="iso8601">
<event start="2008-1-1"...>...</event>
</data>
then even though you do have date-time-format set correctly, the actualy
date 2008-1-1 is incorrectly formatted. It should be 2008-01-01.
There are many things that can go wrong. This is why having access to
the live timeline will make debugging a lot easier. Otherwise, it's just
guesswork. (It's like asking a doctor to diagnose a patient by looking
at just a few photos.)
If for some reason you don't want to provide the URL to your official
timeline here, then make a copy of it. Put in fake events or whatever,
but still make sure that the copy exhibits the same problems. Then
provide the URL to the copy.
David
jh w wrote:
> Hi,David,thanks!
>
> here is the code:
>
>
>
> <html>
> <head>
> <title>Valuenet | Timeline</title>
> <link rel='stylesheet' href='styles.css' type='text/css' />
> <script src="src/webapp/api/timeline-api.js" type="text/javascript" >
> Timeline_ajax_url="src/ajax/api/";
> Timeline_urlPrefix='src/webapp/api/';
> Timeline_parameters='bundle=true';
> </script>
>
> <link href="/css/print.css" type="text/css" rel="stylesheet"
> media="print" />
> <style type="text/css">
>
> </style>
> <script>
> var tl;
> function onLoad() {
> var eventSourceAdvertisement = new
> Timeline.DefaultEventSource(0);
> var eventSourceSocial = new Timeline.DefaultEventSource(0);
> var eventSourceNullXml = new Timeline.DefaultEventSource(0);
> var themeClassic = Timeline.ClassicTheme.create();
> var theme = Timeline.ClassicTheme.create();
>
> var zones = [
> { start: "2000",
> end: "2012",
> magnify: 3,
> unit: Timeline.DateTime.WEEK
>
> }
> ];
> var zones2 = [
> { start: "2000",
> end: "2012",
> magnify: 1,
> unit: Timeline.DateTime.DAY
> }
> ];
> var d = Timeline.DateTime.parseGregorianDateTime("Wed Oct
> 01 2008 00:00:00 GMT-0600");
> // var d = new Date()
> var bandInfos = [
> Timeline.createHotZoneBandInfo({
> width: "45%",
> intervalUnit: Timeline.DateTime.DAY,
> intervalPixels: 100,
> zones: zones2,
> eventSource: eventSourceAdvertisement,
> date: d,
> timeZone: 8,
> theme: theme
> }),
> Timeline.createHotZoneBandInfo({
> width: "45%",
> intervalUnit: Timeline.DateTime.DAY,
> intervalPixels: 100,
> zones: zones2,
> eventSource: eventSourceSocial,
> date: d,
> timeZone: 8,
> theme: themeClassic
> }),
> Timeline.createHotZoneBandInfo({
> width: "10%",
> intervalUnit: Timeline.DateTime.WEEK,
> intervalPixels: 50,
> zones: zones,
> eventSource: eventSourceAdvertisement,
> date: d,
> overview : true,
> theme: themeClassic
> })
>
> ];
> bandInfos[2].syncWith = 0;
> bandInfos[1].syncWith = 0;
> bandInfos[2].highlight = true;
>
> tl = Timeline.create(document.getElementById("tl"),
> bandInfos);
>
>
> tl.loadXML("src/webapp/examples/valuenet/advertisement.xml",
> function(xml, url) {
> eventSourceAdvertisement.loadXML(xml, url);
> });
> tl.loadXML("src/webapp/examples/valuenet/social.xml",
> function(xml, url) {
> eventSourceSocial.loadXML(xml, url);
> });
> //
> setupFilterHighlightControls(document.getElementById("controls"), tl,
> [0,1], theme);
> // tl.loadXML("src/webapp/examples/valuenet/NullXml.xml",
> function(xml, url) {
> // eventSourceNullXml.loadXML(xml, url);
> // });
> }
> var resizeTimerID = null;
> function onResize() {
> if (resizeTimerID == null) {
> resizeTimerID = window.setTimeout(function() {
> resizeTimerID = null;
> tl.layout();
> }, 500);
> }
> }
>
>
> </script>
> </head>
> <body onload="onLoad();" onresize="onResize();">
> <div id="tl" class="floatLeft" class="timeline-default theme"
> style="position:relative;top:1em;left:125px;width: 700px; height:
> 350px; border: 1px solid #aaa">
> </div>
>
>
> <script type="text/javascript">
> var winW = 630, winH = 350;
>
> if (parseInt(navigator.appVersion)>3) {
> if (navigator.appName=="Netscape") {
> winW = window.innerWidth;
> winH = window.innerHeight;
> }
> if (navigator.appName.indexOf("Microsoft")!=-1) {
> winW = document.body.offsetWidth;
> winH = document.body.offsetHeight;
> }
> }
> </script>
> <script type="text/javascript">
> if (winW > 1020) {
> document.getElementById("tl").style.height="350px";
> }
> </script>
>
>
> <div class="tYearJumps" style="width: 100%">
> <table style="text-align: center; width: 100%;">
> <tr>
> <td><a href="javascript:tardis( '20080115' )">Jan</a></td>
> <td><a href="javascript:tardis( '20080215' )">Feb</a></td>
> <td><a href="javascript:tardis( '20080315' )">Mar</a></td>
> <td><a href="javascript:tardis( '20080415' )">Apr</a></td>
> <td><a href="javascript:tardis( '20080515' )">May</a></td>
> <td><a href="javascript:tardis( '20080615' )">Jun</a></td>
> <td><a href="javascript:tardis( '20080715'
> )">July</a></td>
> <td><a href="javascript:tardis( '20080815' )">Aug</a></td>
> <td><a href="javascript:tardis( '20080915'
> )">Sept</a></td>
> <td><a href="javascript:tardis( '20081015' )">Oct</a></td>
> <td><a href="javascript:tardis( '20081115' )">Nov</a></td>
> <td><a href="javascript:tardis( '20081215' )">Dec</a></td>
> </tr>
> </table>
> </div>
>
>
> </body>
> </html>
>
> On Thu, Dec 25, 2008 at 11:59 AM, David Huynh <[email protected]
> <mailto:[email protected]>> wrote:
>
>
> As always, it's best to give us the URLs to your problematic files and
> we'll check what's wrong with them directly.
>
> David
>
> jh w wrote:
> > Hi,
> >
> > Thanks for your advice.
> >
> > But "date-time-format = "iso8601" " makes the XML not be loaded.
> >
> >
> >
> >
> >
> > On Thu, Dec 25, 2008 at 11:44 AM, David Huynh
> <[email protected] <mailto:[email protected]>
> > <mailto:[email protected] <mailto:[email protected]>>> wrote:
> >
> >
> > jh w wrote:
> > > Larry:Thank you !
> > >
> > > I read the contents of the source url ,I use the the "
> > dateTimeFormat
> > > = "iso8601" " in my XMLfile ,but this does not work .
> > >
> > > ==========================
> > >
> > > <data
> > > wiki-url=""
> > > wiki-section="discuz"
> > > dateTimeFormat = "iso8601"
> > > >
> > It's date-time-format rather than dateTimeFormat.
> >
> > David
> >
> >
> >
> > >
>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---