Hi I follow the suggestion to use an aspx that returns XML and it's working fine. Thank you all.
On Oct 13, 10:53 pm, contemplative <[email protected]> wrote: > This is a snippit from code I use to load thetimelinebased on what > the user selects. > The tl.loadXML points to a perl script which generates theXMLand > returns it. All the rest of that > stuff (a_s,s,e,p,l) are the values of check boxes that the user has > selected on a web form which tells the > perl script how to run the query from which theXMLis generated. If > you are not handing parameters in like > that, you can pretty much just get rid of everything after the ? and > before the coma and substitute your .asp file > name where the "../../../cgi-bin/dt.cgi" is. > > tl =Timeline.create(document.getElementById("tl"), bandInfos); > if (r == "splocal_MOMwjwrpt_dept_downtime_detail") { > tl.loadXML("../../../cgi-bin/dt.cgi?start_time=" + s + > "&end_time=" + e + "&phase=" + p + "&plant=" + l, function(xml, url) > { eventSource.loadXML(xml, url); }); > tl.loadXML("../../../cgi-bin/ot.cgi?start_time=" + a_s + > "&end_time=" + e + "&phase=" + p + "&plant=" + l, function(xml, url) > { eventSource1.loadXML(xml, url); }); > } > > Pretty much the same as what Steve offered up above, but showing > arguments going to the back end... > > wjw > On Oct 13, 6:39 am, Steven Manos <[email protected]> wrote: > > > Hi, > > > On Tue, Oct 13, 2009 at 12:00 PM, Quim <[email protected]> wrote: > > > I search this forum in order to find code to useXMLdata directly > > > without using a file. > > > I saw a few posts but none of them post the code. > > > I'm using an ASP.NET application where I get SQL Server data and I > > > want to feedTimeLinewithout saving aXMLfile. > > > How can I do it? > > > I generate the data on-the-fly using PHP - you can do the same with ASP. I > > refer to the PHP as follows: > > > tl =Timeline.create(document.getElementById("data-timeline"), > > bandInfos); > > Timeline.loadJSON("genDataJSON.php", function(json, url) { > > eventSource.loadJSON(json, url); }); > > > There I have used JSON-encoded data butXMLis fine too. > > > Steven. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
