Code-mode custom JS and CSS libraries
Answered
Hi guys, I am trying to use datatables in YF 9 code-mode.
I need to link the related js and css libraries but I could not figure out where to place them. Any suggestions?
Please see the attached ss
Files:
codemode.PNG
Hi Vefa,
Thanks for reaching out. If you take a look at our Code Mode Example in our Wiki entry for Dashboard Code Mode, you'll see that External Libraries should be referenced in the JavaScript section. You may need to alter the syntax a bit from our example to include this library, but I'm afraid the exact methods by which these scripts would have to be altered would be best handled by a developer, which is who Code Mode is intended for, but please let me know if this example proves to be helpful.
That said, there is one thing that jumps out at me here that may be worth starting from - this portion:
Should be removed from the HTML section and placed in the JS section.
Regards,
Mike
Hi Vefa,
Thanks for reaching out. If you take a look at our Code Mode Example in our Wiki entry for Dashboard Code Mode, you'll see that External Libraries should be referenced in the JavaScript section. You may need to alter the syntax a bit from our example to include this library, but I'm afraid the exact methods by which these scripts would have to be altered would be best handled by a developer, which is who Code Mode is intended for, but please let me know if this example proves to be helpful.
That said, there is one thing that jumps out at me here that may be worth starting from - this portion:
Should be removed from the HTML section and placed in the JS section.
Regards,
Mike
Hi Mike, thanks for the explanation.
Usually, we put the javascript libraries in the head part of an HTML document. Is there a possibility to reach out that section?
If not, I have to use the intended method, as you said.
Thanks for the function warning as well!
Hi Mike, thanks for the explanation.
Usually, we put the javascript libraries in the head part of an HTML document. Is there a possibility to reach out that section?
If not, I have to use the intended method, as you said.
Thanks for the function warning as well!
Hi Vefa,
I think you're okay to leave the libraries in the HTML section. This whole part:
But the function to call the libraries that I referenced in my previous post should be in the JS section.
Regards,
Mike
Hi Vefa,
I think you're okay to leave the libraries in the HTML section. This whole part:
But the function to call the libraries that I referenced in my previous post should be in the JS section.
Regards,
Mike
Hi Vefa,
I just wanted to check in and see how things are going with this.
Regards,
Mike
Hi Vefa,
I just wanted to check in and see how things are going with this.
Regards,
Mike
Hi Mike, thanks. I was able to solve my problem. You can close the ticket.
Hi Mike, thanks. I was able to solve my problem. You can close the ticket.
Replies have been locked on this page!