Sorry guys, I found out what it was!
I was using "undefined" instead "null" assigned to the structure!

I post here the correct function for 2.3.0 zip version


function addEvent()
                {

                        var taskname = document.getElementById("etitle").value;
                        var taskdesc = document.getElementById("edesc").value;
                        var startdate = document.getElementById("estart").value;
                        var enddate = document.getElementById("eend").value;
                        var isDuration = false;
                        var eventimage = document.getElementById("eimg").value;
                        var eventicon = document.getElementById("eico").value;
                        var eventurl = "";
                        var eventcolor = "#ff0000";
                        var eventtextcolor= "#000000";


                        var evt = new Timeline.DefaultEventSource.Event({
                      id: null,
                   start: Timeline.DateTime.parseGregorianDateTime
(startdate),
                     end: Timeline.DateTime.parseGregorianDateTime
(enddate),
             latestStart: null,
             earliestEnd: null,
                 instant: isDuration,
                    text: taskname,
             description: taskdesc,
                   image: "data/"+eventimage,
                    link: "http://www.litobyte.com";,
                    icon: "data/"+eventicon,
                   color: eventcolor,
               textColor: eventtextcolor,
               hoverText: "ciao stronzi!",
              className: null,
                                                        tapeImage: null,
                                                        tapeRepeat: null,
                                                        caption: null,
                eventID: null,
                trackNum: null
        });
                        eventSource._events.add(evt);
                }


Now I go for a quick removeEvent patch! (!?)

Should be simile-ajax-api.js and sources.js the files to touch ?
Thanks again.


On 8 Lug, 02:09, Litobyte <[email protected]> wrote:
> Hello, I tried the code below  with timeline 2.3.0 zip version, but I
> can't get it to work!!
>
> I tried with IE or Firebug and NO ERRORS are rised up.
>
> Simply, after the ( num_of_event_in_XML +1 ) time I launch this
> function below,
> everything vanishes, and the previous time, nothing is added, and the
> timeline just redraw as it was.
>
> This the code I use,
> Thanks for the help in advance!!!
>
> [code]
> function addEvent()
>                 {
>
>                         var taskname = 
> document.getElementById("etitle").value;
>                         var taskdesc = document.getElementById("edesc").value;
>                         var startdate = 
> document.getElementById("estart").value;
>                         var starttime = "00:00:00";
>                         var enddate = document.getElementById("eend").value;
>                         var endtime = "";
>                         var earliestEnd ="";
>                         var latestStart ="";
>                         var isDuration = false;
>                         var eventimage = 
> document.getElementById("eimg").value;
>                         var eventicon = document.getElementById("eico").value;
>                         var eventurl = "";
>                         var eventcolor = "#ff0000";
>                         var eventtextcolor= "#000000";
>
>                         var evt = new Timeline.DefaultEventSource.Event(
>                          Timeline.DateTime.parseGregorianDateTime(startdate),
>                          Timeline.DateTime.parseGregorianDateTime(enddate),
>                          Timeline.DateTime.parseGregorianDateTime(null),
>                          Timeline.DateTime.parseGregorianDateTime(null),
>                          isDuration,
>                          taskname,
>                          taskdesc,
>                          eventimage,
>                          eventurl,
>                          eventicon,
>                          eventcolor,
>                          eventtextcolor
>                         );
>                         eventSource._events.add(evt);
>                         eventSource._fire("onAddMany", []);
>
>                         tl.layout();
>
>                 }
> [/code]
>
> What's wrong ??
--~--~---------~--~----~------------~-------~--~----~
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