Thanks Erez, that worked.

As it turns out, this method didn't work for IE6; however, IE6 was able to
run my function after LoadXML() method.  I'm guessing that IE6 isn't
supporting the async load, which would explain its behavior.

Another challenge I had was that the div container for the events content
doesn't have an ID attribute--though it has a "name=events" attribute.  FF
supports a getElementsByName, but IE doesn't.  Unfortunately, I had to hard
code the node navigation to the container.  An ID would sure be helpful at
some point so the universally supported getElementById could be used.

Thanks again.  This is pretty cool!
jrw

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Erez Boym
Sent: Monday, March 17, 2008 5:36 PM
To: General List
Subject: Re: Dynamically adjusting the Timeline container height after
loadingdata

Hi,

Try to use the addMany event. Register your function using:
myTimeLine.getBand(3).getEventSource().addListener({onAddMany: function()
{Your function here;}});


Best regards

----- Original Message ----
From: John Ward <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, March 17, 2008 7:42:25 AM
Subject: Dynamically adjusting the Timeline container height after loading
data

SIMILE TIMELINE
I want to adjust the height of the timeline container to best fit the
plotted data.

As a work around I've written a JS method that iterates through the items in
the timeline to identify the Top Position attribute with the greatest value.
I add a few em's to compensate for the bottom band, assign the new height to
the timeline div container, then call "layout()" to refresh the timeline.  

My problem is that I can't get scripting control immediately after the data
is loaded. After LoadXML() plots the data to the timeline, all scripting
ends (I assume this has something to do with asynchronous loading, but I
don't know how to work around it).

I can't call my method after the onLoad() event, because my method then
fires BEFORE the data is loaded (i.e. the timeline is painted, but the data
is not loaded).

Does anyone know how to call a method immediately after data is loaded, or
whether or not there's an easier solution?

Working example:  http://familyware.com/timeline/timeline.aspx
Instead of a user click, I want to resize the timeline automatically.

John Ward


_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general


_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to