empty | 8 Feb 15:43

can't find out how use Javascript libs such as HighStock

Hi 
I'm very new to JavaScript as well as Aida/Web.
The task is to show chart in HighStock JavaScript on a page that represents
an object that holds the data.
The chart lib has several js files, namely, a "js/highchart.js",
"/adapter/prototype-adapter.js", "/adapter/mootools.js" and
"/modules/exporting.js" and some /themes/xyz.js
In WebStyle I manually added  methods for those JavaScript, after the
examples found in WebStyle such as jQurery, including xyzResource and
ensureXYZ etc.
And I added lines to WebElement intending to add those JavaScript into the
<head>.
After this I used scriptAfter: to insert the code for charting. The code is
just a copy of original example code.
Well, it doesn't work.
Any advises?

Yours,

JG

P.S.
Here are some code:

viewChart

	| e |
	e := WebElement new.
	e ensureId.
	e addTextH1: 'highstock charts'.
(Continue reading)

Janko Mivšek | 8 Feb 16:03
Picon
Gravatar

Re: can't find out how use Javascript libs such as HighStock

Hi Empty,

First welcome to the list!

Please check the resulting page with FireBug or similar to see if
libraries are present in a header, then open each library in web browser
manually, like http:.../adapter/mootols.js' to check if they are
composed correctly.

Also check in FireBug if script you put after the element is actually
there. Also are some JS errors shown in console?

Hope this helps
Best regards
Janko

S, empty piše:
> Hi 
> I'm very new to JavaScript as well as Aida/Web.
> The task is to show chart in HighStock JavaScript on a page that represents
> an object that holds the data.
> The chart lib has several js files, namely, a "js/highchart.js",
> "/adapter/prototype-adapter.js", "/adapter/mootools.js" and
> "/modules/exporting.js" and some /themes/xyz.js
> In WebStyle I manually added  methods for those JavaScript, after the
> examples found in WebStyle such as jQurery, including xyzResource and
> ensureXYZ etc.
> And I added lines to WebElement intending to add those JavaScript into the
> <head>.
> After this I used scriptAfter: to insert the code for charting. The code is
(Continue reading)


Gmane