Hi Pedro,

Put the over-riding code right after the code where you define your
timeline.

So you might do it like this...

    <script>
        var tl;
        function onLoad() {
        :
        }

        var resizeTimerID = null;
        function onResize() {
        :
        }

        Timeline.DefaultEventSource.Event.prototype.fillInfoBubble =
        function(elmt, theme, labeller) {
              alert('Foo');
        }
        :
    </script>


Cheers,
Scott

On Fri, Apr 3, 2009 at 4:25 PM, Pedro Erzubiaki <[email protected]> wrote:

> thanks scott, but in which archive I insert this function?
>
> I do not know where to insert it and nor as calls-there =(
>
> Example:
>
> in the file compact-painter.js I add the function:
>
> Timeline.DefaultEventSource.Event.prototype.fillInfoBubble = function(elmt,
> theme, labeller) {
>     alert('Foo');
> }
>
> in the file compact-painter.html??????????????
>
> var bandInfos = [
>                 Timeline.createBandInfo({
>                     width:          "90%",
>                     intervalUnit:   Timeline.DateTime.WEEK,// padrĂ£o WEEK,
>                     intervalPixels: 150, //150
>                     eventSource:    eventSource,
>                     date:           d,
>                     theme:          theme,
>                     eventPainter:
> Timeline.CompactEventPainter,               // here i call the function
> ?????????????/
>
>
> I call the function through eventPainter??????????????
>
>
>
>
>
>
>
>
> 2009/4/2 Scott Thomson <[email protected]>
>
>> Sorry Pedro, I'm having a bit of trouble understanding what you are
>> asking.
>>
>> If you want an alert to come up when someone clicks on the timeline try
>> adding this code after your timeline definition
>>
>> Timeline.DefaultEventSource.Event.prototype.fillInfoBubble =
>> function(elmt, theme, labeller) {
>>     alert('Foo');
>> }
>>
>> Does the InfoBubble not do what you want?
>>
>>
>> On Fri, Apr 3, 2009 at 9:22 AM, Pedro Erzubiaki <[email protected]>wrote:
>>
>>> somebody can help me?
>>>
>>> =(
>>>
>>>
>>>
>>> 2009/4/2 Erzu <[email protected]>
>>>
>>>>
>>>> when click in an object of timeline I want that he calls a function,
>>>> somebody I could say which archive I must modify  and what I must make
>>>> to call the function?
>>>>
>>>> in the truth I want that when internauta click in the object of
>>>> timeline appears an alert (Javascript).
>>>>
>>>> somebody can help me?
>>>>
>>>> regards,
>>>> Erzu
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>> --
>> Scott Thomson
>> 0401 726 889
>>
>>
>>
>>
>
> >
>


-- 
Scott Thomson
0401 726 889

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