JavaScript tags cannot be self-closing

I was puzzled today by the following exception coming out of one of our web application: this._form has no properties. The exception occurred even on simple pages that had a form and a Script Manager tag. After troubleshooting the issue, I traced it down to the script tag on the site master page. Apparently, JavaScript tags cannot be self-closing.  

Replacing 

             <script language="javascript" type="text/javascript" src="my.js"/> 

with  

             <script language="javascript" type="text/javascript" src="my.js"></script>  

resolved the issue. Happy coding!

Welcome to ModelBlog

Thank you for visiting ModelBlog. We hope the time you spend with us will be both entertaining and worth your while. Have fun!

Authors

Search

Archive

Tags