I am kind of new to web development..so not sure if this is possible, I am trying to load a script file from HTML file. Script file is available one folder up than the html
/test/myScript.js
/test/test123/MyPage.html
I am trying to load myscript.js file using following..but its not working. let me know how to proceed further on this.
<script src="../test/myScript.js" type="text/javascript"></script>
I have an emtpy web project from visual studio, this html file is added there. when i run the solution this file start on IISExpress
1 Answer 1
You need to remove test from the path.
Try this.
<script src="../myScript.js" type="text/javascript"></script>
Make sure script file is also added to visual studio project.
HINT : You can also drag script file to the HTML editor in visual studio. It would have created script tag with path for you. Not sure which visual studio you are using but almost all VS support this.