Hi Marcel,

Note that typically, a php script ends in .php .... 

Anyhow, if you want your php script to tell the Javascript to center the 
Timeline to a particular date, then you just need to pass the information along 
from the php to a script element inside the html. Then have the script center 
the Timeline.

Tips for debugging this sort of thing:
1) Remember that the php produces an html file. So look in the source of the 
RESULTING html file on your browser to see what the php program produced.
-- Use View Source on the browser.

2) Remember that the php file needs to write out valid javascript.
-- check that dates in string format are surrounded by quotes.

3) Once the javascript in the php-produced html looks right, use Firebug to 
debug the javascript.

Note: The following javascript looks wrong:
<script>centerTimeline(cDate); </script>

It should be something more like 
<script>timeline_object.centerTimeline(cDate); </script>
 -- where timeline_object is the result from the create_timeline call.

Also, cDate has to be in the right format. See the centerTimeline documentation.

Good luck,

Larry




________________________________
From: "[email protected]" 
<[email protected]>
To: SIMILE Widgets <[email protected]>
Sent: Wednesday, March 4, 2009 11:55:53 AM
Subject: Re: Center timeline via extern link


Hello Larry,

thank you a lot for the fast and detailed answer. Maybe i described my
question a bit wrong. I am not trying to parse the whole string just
use the passed GET_variable to center the timeline at this location
via link. e.g. i have a CMS with lots of events and every event is
linked (show this event on the timeline) with a passed GET_variable.

http://www.yourdomain.com/timeline.html?cDate=1500  was an example for
calling the timeline.html and pass a date (cDate=1500) as a
GET_variable

This cDate variable contains the information which date should be the
center-date. Then a script (PHP or ASP.NET) reads out this GET_vars
and pass cDate to a javascript which shall center the timeline
according to its value.
I already tried the centerTimeline -function but without success.

I though that it is ok just to call
<script>centerTimeline(cDate); </script> when the variable is set,
otherwise timeline should use its default - center.

What is wrong with my considerations? And please be patient i am new
to this stuff too (o:
As soon as possible i will post a link to this timeline-mashup.

Thx for reading i hop it is no too confusing! (o:



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to