You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ignacio González Arboleya <na...@hotmail.com> on 2009/07/29 17:44:08 UTC
Problem with Tapestry.onDOMLoaded when generating java script
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 problems since the javascript code generated is like this:
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 code is correct, but my web browsers do not process it because of these two lines: Tapestry.DEBUG_ENABLED = true;
Tapestry.onDOMLoaded(function() {
I am sure that these two lines are the problem, since I have already tried deleting them and everything works fine.Could anyone help me please? What can I do to make my browsers recognize those 2 lines? Thankyou, Nacho.
Re: Problem with Tapestry.onDOMLoaded when generating java script
Posted by "Juan E. Maya" <ma...@gmail.com>.
Hi Ignacio, what kind of problem are u having? do u get an specific
error? have u tried to use firebug to debug the javascript and fine
the problem?
I am pretty confident the problem is with the javascript u have
written and not Tapestry's
2009/7/29 Ignacio González Arboleya <na...@hotmail.com>:
> 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 problems since the javascript code generated is like this:
>
> 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 code is correct, but my web browsers do not process it because of these two lines: Tapestry.DEBUG_ENABLED = true;
> Tapestry.onDOMLoaded(function() {
> I am sure that these two lines are the problem, since I have already tried deleting them and everything works fine.Could anyone help me please? What can I do to make my browsers recognize those 2 lines? Thankyou, Nacho.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org