Referencing external javascript needing jquery

Referencing external javascript needing jquery

I want to reference an external javascript file that also needs jquery to run. On platform 6 and below, I did a AddJavaScriptTag from the HttpRequestHandler extension, but since that tag is placed at the top of the body section, no jquery is loaded at that stage. I also included a recent version of jquery, but on platform 8 that doesn't work if I select the 1.8 version because of conflicts occuring. So my question is: how can I add a reference to an external javascript resource that needs jquery?
Hello Kilian,

take a look at this API: 

I think that it might help you.

Pedro Cardoso
Hi Killian,

Have you tried using the HttpRequestHandler extension?

Pedro's answer is also something to consider. Using the Include Javascript API, you'll be able to add your script to all screens of all applications. So if you have a script to perform user tracking, like google analytics, probably the best way is to use this API.

Just for reference, if you want to write your own javascript, you should use the 'Javascript' property of your Screens.
Hi Pedro, Joao,

I need this script only on selected pages (it's a charts library), and I need it referenced, not copy/pasted into the javascript. So what I need is a link to the external javascript file, but after the platform loading of jquery (since this particular library depends on it). So neither Include_Javascript nor including it in the Javascript property cuts it, in this particular use case.
Hi Killian,

You can always use AddJavaScriptTag twice, first for loading the required jQuery version (the platform allows you to load an external jQuery version, and you could use a cdn), and last to load your required resources. 

Tiago Simões

can you share a sample espace for us to try to help?

Hi Tiago,

That's what I did on platform 6 (and we still do on platform 8 when using the older OS version of jquery), but when I do that on a "fresh" eSpace on platform 8 (using the platform jquery 1.8.2), I get conflicts between the included jquery and the platform included jquery.
Hi Pedro,

I could, but the use case is really simple. I'm trying to include the latest High Charts, which needs jquery, but I can't get the externally referenced High Charts to be included after the platform jquery, as explained.
and the forge highcharts component?
(it used to work with 5 afaik, check on older versions perhaps)
@Statler: The reason why I didn't mention what specific external js I was trying to interface is to avoid such specific answers :). Imho this is a general issue, viz. how to include a link to an external javascript library that needs jquery.

but I think we are lacking a proper solution
(noticing this thread:

Mmm, that indeed seems to be a very similar problem. It doesn't look too good...
Bugger, in the same boat now.

I need to add a languages.js. because inline webblock will screw up the characters...

How do you up date JQuery version from :- 1.4.0 to 1.8.1 or 1.8.2 ??????
Omran, I don't think your question has anything to do with this thread. You'd better start a new post, explaining exactly what you want to do. Also, one question mark will already make us understand it's a question, so no need to use six.
I already figured it out.... thanks any way for that pretty useless advice !!!!!!
Omran, if you use a single exclamation mark, we already understand you are shouting, so no need to use six. Perhaps your question mark and exclamation mark keys are stuck?
THIS IS SHOUTING ..... exclamation marks ... as the name suggests ...are exclamations ...if nothing else Kilian u r very good at counting to 6 ..well done !!!!!!!!!
I can even count to 9. It seems you feel the need to exclaim yourself quite extensively.