We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Including external Javascript + CSS libraries

Hello,

I have a quick question on include structure in OpenClinica. We are building set of libraries to support our validations rules globally but not sure how to include those in OpenClinica.
Ideally, our JS files are included in only one file but was not able to find anything to support this.

Please advise

Answers

  • lindsay.stevenslindsay.stevens Posts: 404 ✭✭✭
    via Email
    1. Put the js fils in the existing includes directory on the server, same
    place as jquery is. It could be anywhere in tomcat webapps folder though.

    2. Put a script tag in your CRF instructions to load your script.

    Your functions could be called on doc ready or attach to events etc.
  • jsykejsyke Posts: 3
    Lindsay,

    Thanks.
    CRF import -- we were able to do. I am actually talking about globally including few JS files.
    Basically, our library helps us create rules+validations on any web page rather than just under CRFs but our main script must be be injected with every page load.

    so far, our analysis suggests that script need to be included in multiple files but hopefully, we are wrong.

    thanks
  • lindsay.stevenslindsay.stevens Posts: 404 ✭✭✭
    via Email
    In that case you could modify the jsp files to include script loading of
    your file, or append your file to an existing resource. I think jquery is
    loaded on every page so you could probably hijack that.
  • jsykejsyke Posts: 3
    I see.
    There are approx. 20+ files to include those files globally. Will try and report back.
    Thank you much for your help.


This discussion has been closed.