Hi,
Here I am trying to build a dynamic table based on user inputs number rof rows and colums, I am seeing "$ is not defined " in javascript code, where the logic is there to build table. I also added the the jQuery CDN link in expression
"
"<script src=""https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js""></script>"
Still seeing the same error. Please provide suggestion on how to get rid of the "$ is not defined" error. Here I am sharing the OML file for referecne. Thank you in advace.
The way you want to include and load the jQuery JavaScript file is not the way you should do it.
Let me first advise to try and not load jQuery, for most of the JavaScript you can do with vanilla JavaScript and improve loading time of your pages in the browser.
Having that said, if you do want to load a JavaScript file from a CDN, best is to use the OnIntialize event of the screen to load the external script.
Still, after you got the jQuery script loaded, the dynamic generation of your table is not going to work the way you do it. You cannot just add HTML code in expressions on your screen. They don't end up in the DOM as a table, but as a text of a html SPAN element.
Instead, you need to add an HTML element, and set the Name property. The HTML element name will be used in the generated html as Id.
See attached updated version of your module
Regards,
Daniel
Hi Daniel , Thanks for solution.
Your workaroud worked for me. Made some required to chanages to header visibility with necessary changes.
Thanks again!