I think the problem here is that the javascript that FLOT is expecting is clashing with the prototype javascript library that tapestry imports. When you use prototype, $ evaluates to a function that expects either a DOM element or the id of a DOM element. Does FLOT use jquery prehaps? If so, you might be able to get round this limitation by using jquery's noConflict mode.
Ciaran On 30/07/2009 9:31am, "Juan E. Maya" <maya.j...@gmail.com> wrote: > Ignacio that's nothing related with tapestry. U should understand what > u r trying to achieve with ur javascript and do it. do u know what > does the $ symbol means before a function and why should that be used? > > The problem is not related tapestry. > > 2009/7/30 Ignacio González Arboleya <nachogo...@hotmail.com>: >> Now I can see the problem: >> >> I've tried to execute other kind of javascript codes and they work fine. >> >> The problem is that FLOT needs the following code to execute: >> >> $(function () { >> var d1 = []; >> for (var i = 0; i < 14; i += 0.5) >> d1.push([i, Math.sin(i)]); >> >> var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]]; >> >> // a null signifies separate line segments >> var d3 = [[0, 12], [7, 12], null, [7, 2.5], [12, 2.5]]; >> >> $.plot($("#placeholder"), [ d1, d2, d3 ]); >> }); >> BUT tapestry automatically generates this:Tapestry.onDOMLoaded(function() >> {(.............)}); WITHOUT THE SYMBOL $ before "function()" that is needed >> to execute FLOT... any ideas please???? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org