Hi, Michael, thank you again for your guidance.

I removed the <? Php stl_simile_timeline ();?>.

I left only: <div id="stl-mytimeline"> </ div>

As nothing happened, ie, the timeline has not appeared, I was
compelled to write:


<script type="text/javascript">
 var tl;
        function onLoad () (
            EventSource Timeline.DefaultEventSource var = new ();

            var zones = [
                (Start: "Fri 22 Nov 1963 00:00:00 GMT-0600"
                    end: "Mon 25 Nov 1963 00:00:00 GMT-0600"
                    magnify: 10,
                    unit: Timeline.DateTime.DAY
                )
                (Start: "Fri 22 Nov 1963 09:00:00 GMT-0600"
                    end: Sun 24 Nov 1963 00:00:00 GMT-0600 "
                    magnify: 5,
                    unit: Timeline.DateTime.HOUR
                )
                (Start: "Fri 22 Nov 1963 11:00:00 GMT-0600"
                    end: "Sat 23 Nov 1963 00:00:00 GMT-0600"
                    magnify: 5,
                    unit: Timeline.DateTime.MINUTE,
                    multiple: 10
                )
                (Start: "Fri 22 Nov 1963 12:00:00 GMT-0600"
                    end: "Fri 22 Nov 1963 14:00:00 GMT-0600"
                    magnify: 3
                    unit: Timeline.DateTime.MINUTE,
                    multiple: 5
                )
            ];
            var zones2 = [
                (Start: "Fri 22 Nov 1963 00:00:00 GMT-0600"
                    end: "Mon 25 Nov 1963 00:00:00 GMT-0600"
                    magnify: 10,
                    unit: Timeline.DateTime.WEEK
                )
                (Start: "Fri 22 Nov 1963 09:00:00 GMT-0600"
                    end: Sun 24 Nov 1963 00:00:00 GMT-0600 "
                    magnify: 5,
                    unit: Timeline.DateTime.DAY
                )
                (Start: "Fri 22 Nov 1963 11:00:00 GMT-0600"
                    end: "Sat 23 Nov 1963 00:00:00 GMT-0600"
                    magnify: 5,
                    unit: Timeline.DateTime.MINUTE,
                    multiple: 60
                )
                (Start: "Fri 22 Nov 1963 12:00:00 GMT-0600"
                    end: "Fri 22 Nov 1963 14:00:00 GMT-0600"
                    magnify: 3
                    unit: Timeline.DateTime.MINUTE,
                    multiple: 15
                )
            ];

            var theme = Timeline.ClassicTheme.create ();
            theme.event.bubble.width = 250;

            var date = "Fri 22 Nov 1963 13:00:00 GMT-0600"
            var bandInfos = [
                Timeline.createHotZoneBandInfo ((
                    width: "100%"
                    intervalUnit: Timeline.DateTime.WEEK,
                    intervalPixels: 200,
                    zones: zones,
                    EventSource: EventSource,
                    date: date,
                    TimeZone: -6
                  / / Theme: theme
                ))
                Timeline.createHotZoneBandInfo ((
                    width: "0%"
                    intervalUnit: Timeline.DateTime.MONTH,
                    intervalPixels: 200,
                    zones: zones2,
                    EventSource: EventSource,
                    date: date,
                    TimeZone: -6,
                    overview: true
                   / / Theme: theme
                ))
            ];
            bandInfos [1]. syncWith = 0;
            bandInfos. [1] highlight = true;

            for (var i = 0; i <bandInfos.length; i + +) (
                bandInfos [i]. decorators = [
                    Timeline.SpanHighlightDecorator new ((
                        startDate: "Fri 22 Nov 1963 12:30:00 GMT-0600"
                        endDate: "Fri 22 Nov 1963 13:00:00 GMT-0600"
                        color: # FFC080 "
                        opacity: 50,
                        startLabel "shot"
                        endLabel "t.o.d."
                       / / Theme: theme,
                       CssClass: 't-highlight1'
                    ))
                    Timeline.PointHighlightDecorator new ((
                        date: "Fri 22 Nov 1963 14:38:00 GMT-0600"
                        color: # FFC080 "
                        opacity: 50,
                        / / Theme: theme,
                        CssClass: 'p-highlight1'
                    ))
                    Timeline.PointHighlightDecorator new ((
                        date: Sun 24 Nov 1963 13:00:00 GMT-0600 "
                        color: # FFC080 "
                        opacity: 50
                        / / Theme: theme
                    ))
                ];
            )

            Timeline.create tl = (document.getElementById ("stl-
mytimeline), bandInfos, Timeline.HORIZONTAL);
            tl.loadXML ("examples / jfk / jfk.xml", function (xml,
url) (eventSource.loadXML (xml, url);));
alert (tl);
        )

        resizeTimerID var = null;
        onResize function () (
            if (resizeTimerID == null) (
                resizeTimerID = window.setTimeout (function () (
                    resizeTimerID = null;
                    tl.layout ();
                ), 500);
            )
        )

</ Script>


Well, the timeline appeared, I used the alert (tl), but did not get
[object Object], but "undefined" and, by clicking on the the same
error occurred:


"Tl is null or not an object"


using the same function:


avancaTimeline function (distance) (


tl.getBand (0). _autoScroll (distance);


)


And running as follows:


BUTTON LEFT | <|

<div id="setaEsq"> <a href="javascript:avancaTimeline(500);"> <img src
= "<? php bloginfo ('stylesheet_directory');?> / images / timeline /
setaEsq.jpg" /> </ a> </ div>



RIGHT BUTTON |> |

<div id="setaDir"> <img src = "<? php bloginfo
('stylesheet_directory');?> / images / timeline / setaDir.jpg" onclick
= "avancaTimeline ();" /> </ div>


I've tested at least ten methods but I always run into the same
problem.
I am using version: 0.4.7 plugin for wordpress.
And my problem occurs only with internet explorer.


If anyone can give some light to my problem, thank you immensely.






On 27 abr, 14:55, Marcos Mendes <[email protected]> wrote:
> Thank you Michael,
>
> Unfortunately at the moment I can not offer an online version. (Even
> though it would help a lot).
>
> Had realized that "tl" for some reason was not being introduced to the
> scope, even trying to "tl" (var tl ... create ...) could succeed on
> its own page in Firefox, but still have the same problem in internet
> explorer when I have the result above I get "tl is undefined."
>
> Is there anything I can do to circumvent this problem in IE?
>
> NOTE:
>
> I noticed that the double click function works fine in IE:
>
> Timeline._Band.prototype._onDblClick = function (innerFrame, evt,
> target) (
>     var coords = SimileAjax.DOM.getEventRelativeCoordinates (evt,
> innerFrame);
>     var distance = coords.x - (this._viewLength / 2 -
> this._viewOffset);
>
>     this._autoScroll (-distance);
> );
>
> My purpose, as I mentioned above is just two buttons to the controller
> to scroll the timeline, one in the right corner, another on the left.
>
> Could I use it somehow as an action to the buttons without referring
> to the so problematic "tl"?
>
> Thank you.
>
> On 27 abr, 12:07, Michael Nosal <[email protected]> wrote:
>
>
>
> > This means that IE can't find a variable named "tl" in scope. This could be 
> > due to the initialization of your timeline is failing in IE, or tl falling 
> > out of scope after initialization.
>
> > Do you have an example online?
> > --Mike
>
> > On Apr 27, 2010, at 10:02 AM, Marcos Mendes wrote:
>
> > > Hi all,
>
> > > I had two buttons at each end of a timeline for controlling the
> > > horizontal scroll of the same.
>
> > > For example:
>
> > > <[bt]    TIMELINE    [bt]>
>
> > > It worked in firefox but in internet explorer to check the following
> > > error occurred:
>
> > > "Error:" tl "is null or not an object"
>
> > > The javascript code I'm using for the button functionality is this:
>
> > > <script language="Javascript" type="text/javascript">
>
> > >           function avancaTimeline(distance) {
>
> > >                        tl.getBand(0)._autoScroll(distance);
>
> > >                };
>
> > > </script>
>
> > > And I'm calling the function as follows:
>
> > >  <!-- BT LEFT -->
>
> > > onclick="javascript:avancaTimeline(500);
>
> > >  <!-- BT RIGHT -->
>
> > > onclick="javascript:avancaTimeline(-500);
>
> > >  <!-- TIMELINE -->
>
> > >  <div id="stl-mytimeline"><?php stl_simile_timeline(); ?></div>
>
> > >  <!-- TIMELINE  -->
>
> > > I appreciate any help.
>
> > > Att,
> > > Marcos Mendes
>
> > > --
> > > 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 
> > > athttp://groups.google.com/group/simile-widgets?hl=en.
>
> > --
> > 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 
> > athttp://groups.google.com/group/simile-widgets?hl=en.
>
> --
> 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 
> athttp://groups.google.com/group/simile-widgets?hl=en.

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