JavaScript tags cannot be self-closing

Posted on April 4, 2008 22:42 by Aleh Matus

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!



Comments

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



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!

Search

Tags