Re: Problem with Tapestry.onDOMLoaded when generating java script

2009-07-30 Thread Juan E. Maya
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

Re: Problem with Tapestry.onDOMLoaded when generating java script

2009-07-30 Thread Ciaran Wood
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

Re: Problem with Tapestry.onDOMLoaded when generating java script

2009-07-30 Thread Juan E. Maya
yep, i just checked and FLOT uses jQuery so that's the problem for sure. On Thu, Jul 30, 2009 at 10:53 AM, Ciaran Woodciar...@gamesys.co.uk wrote: I think the problem here is that the javascript that FLOT is expecting is clashing with the prototype javascript library that tapestry imports. When

Problem with Tapestry.onDOMLoaded when generating java script

2009-07-29 Thread Ignacio González Arboleya
Hi everybody, a few days ago I wrote this message: http://markmail.org/thread/dw56hbrdimi7rcta Finally, thanked to the people who answered my question, I decided to use RenderSupport.addScript() to generate javascript dinamically. But, now, I am having

Re: Problem with Tapestry.onDOMLoaded when generating java script

2009-07-29 Thread Ignacio González Arboleya
Hi, I have no erros, it's just that the chart that should be loaded it isn't. However, if I delete those 2 lines, it is load perfectly...

Re: Problem with Tapestry.onDOMLoaded when generating java script

2009-07-29 Thread Juan E. Maya
The line inside the Tapestry.onDOMLoaded function must be the one that is causing the problem. are u sure u aren't adding that line? 2009/7/29 Ignacio González Arboleya nachogo...@hotmail.com: Hi,   I have no erros, it's just that the chart that should be loaded it isn't. However, if I

Fw: Problem with Tapestry.onDOMLoaded when generating java script

2009-07-29 Thread Ignacio González Arboleya
Tapestry.DEBUG_ENABLED = true; Tapestry.onDOMLoaded(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]];var d3 = [[0, 12], [7, 12], null, [7, 2.5], [12, 2.5]];$.plot($(#placeholder), [ d1, d2, d3 ]); }); The

Fw: Problem with Tapestry.onDOMLoaded when generating java script

2009-07-29 Thread Ignacio González Arboleya
I am sorry again... i mean that function() { is autogenerated by tapestry Tapestry.DEBUG_ENABLED = true; Tapestry.onDOMLoaded(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]];var d3 = [[0, 12], [7, 12], null, [7,

Re: Fw: Problem with Tapestry.onDOMLoaded when generating java script

2009-07-29 Thread Juan E. Maya
Can u please tell us what components are u using inside the page? or maybe even post the page, because i am pretty sure tapestry doesn't generate this javascript: 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]];var d3 = [[0, 12],

Re: Problem with Tapestry.onDOMLoaded when generating java script

2009-07-29 Thread Juan E. Maya
so ur adding the javascript :) This piece of code tells tapestry to add the javascript: renderSupport.addScript( var d1 = []; + for (var i = 0; i 14; i += 0.5)+ d1.push([i, Math.sin(i)]);+ var d2 = [[0, 3], [4, 8], [8,