Hi. I am new in dnn and I took the "Module Development for Non-Developers, Skinners, & DNN Beginners - Blog Series Intro". I have finished it. Now, I want to move javascript instructions in the View.ascx to an external .js file.
The problem is javascript file, it doesn't know '<%= %>', VisualStudio returns a sintax error.
View.ascx:
<script src='<%=ResolveClientUrl("module.js") %>' type="text/javascript"></script>
module.js:
var moduleId = <%= ModuleId %>;
var CurrentUserID = <%= UserId %>;
var ShowCompletedTasks = <%= Settings["ShowCompletedTasks"].ToString() %>;
How can I pass this variables? Why doesn't it run when I move the js code to an external file?
Thanks.