#1 2022-07-07 10:28:38

Johann
Member
Registered: 2022-05-30

Groovy Script Reports: Unable to load jquery and Javascript libraries

I have the following in my `head` tag:

1: jquery CDN
2 and 3: Datatables library CDN
4 and 5: URLs to custom CSS files stored in ReportServer filesystem

script(src: "https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js")
script(type: "text/javascript", charset: "utf8", src:"https://cdn.datatables.net/1.12.1/js/jquery.dataTables.js")
link(rel: "stylesheet", type: "text/css", href: "https://cdn.datatables.net/1.12.1/css/jquery.dataTables.css")

link(href: mainCssLink, rel: "stylesheet", type:  "text/css")
link(href: bttnCssLink, rel: "stylesheet", type:  "text/css")

Without the first 3 tags, my CSS works fine. However, once I try to load jquery and the Datatables (https://datatables.net/) libraries, my styles are no longer loaded. Only when I add inline styles or shift my custom CSS links to the body tag, do they reappear. From this, it seems that the issue is the jquery and JS libraries are overriding the custom CSS despite them being placed before the custom CSS links.

How can this issue be fixed?

Offline

#2 2022-07-18 14:31:39

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Groovy Script Reports: Unable to load jquery and Javascript libraries

Hi Johann,

this seems to be a JQuery / CSS issue/question. Pls check the JQuery / CSS documentation on the internet for more information.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB