海边pharo smalltalk中的JQPlot错误

时间:2022-09-15 10:49:42

I had used the following code and i am receiving the firefox firebug error.

我使用了以下代码,我收到firefox firebug错误。

Code:

(canvas anchor)
    id:(canvas nextId);
    onClick:  'alert("Thank you");';
    with:'help me'.

I could load the jqplot libraries in updateRoot SUCCESSFULLY as follows:

我可以在updateRoot SUCCESSFULLY中加载jqplot库,如下所示:

updateRoot: t1

super updateRoot: t1.


t1 javascript resourceUrl:'gemstone/scripts/dist/jquery.min.js'.
t1 javascript resourceUrl:'gemstone/scripts/dist/jquery.jqplot.min.js'.
t1 javascript resourceUrl:'gemstone/scripts/dist/plugins/jqplot.blockRenderer.min.js'.
t1 javascript resourceUrl:'gemstone/scripts/dist/plugins/jqplot.enhancedLegendRenderer.min.js'.
t1 javascript resourceUrl:'gemstone/scripts/dist/plugins/jqplot.bubbleRenderer.min.js'.

t1 javascript resourceUrl:'gemstone/scripts/dist/plugins/jqplot.barRenderer.min.js'.
t1 javascript resourceUrl:'gemstone/scripts/dist/plugins/jqplot.pieRenderer.min.js'.
t1 javascript resourceUrl:'gemstone/scripts/dist/plugins/jqplot.categoryAxisRenderer.min.js'.
t1 javascript resourceUrl:'gemstone/scripts/dist/plugins/jqplot.pointLabels.min.js'.
t1 stylesheet resourceUrl:'gemstone/scripts/dist/jquery.jqplot.min.css'.**.

I am not getting any alert and I am receiving the following javascript error in firebug in firefox.

我没有得到任何警报,我在firefox中的firebug中收到以下javascript错误。

$("#id1").on is not a function

$(“#id1”)。on不是函数

1 个解决方案

#1


1  

Remove the '**.' at the end of your #updateRoot: method and see what happens.

除掉 '**。'在#updateRoot:方法的最后,看看会发生什么。

Check the rendered html in the body of the page for your root component. It should be:

检查页面正文中的渲染html以获取根组件。它应该是:

<a id="id1" onclick="alert("Thank you");">help me</a>

Nothing you've shown should change that. If its not then you need to give more information.

你所展示的任何东西都不应该改变它。如果不是那么你需要提供更多信息。

#1


1  

Remove the '**.' at the end of your #updateRoot: method and see what happens.

除掉 '**。'在#updateRoot:方法的最后,看看会发生什么。

Check the rendered html in the body of the page for your root component. It should be:

检查页面正文中的渲染html以获取根组件。它应该是:

<a id="id1" onclick="alert("Thank you");">help me</a>

Nothing you've shown should change that. If its not then you need to give more information.

你所展示的任何东西都不应该改变它。如果不是那么你需要提供更多信息。