Interesting issue Shawn and I ran into today with the <script> tag in ASP .Net. A page was defined with <script> tag that was closed with a /> instead of </script> as shown below.
<script language="javascript" src="myJavaScripts.js" type="text/javascript" />
And any time a control on the page did a post back it started throwing java script errors such as "Object Expected". Other variants could be "__doPostback not defined" but I did not see that error. Anyway the culprit was the /> closing tag. So to fix the error I had to end the <script> tag with </script> tag instead of />. So changing the above statement to
<script language="javascript" src="myJavaScripts.js" type="text/javascript"><script>
fixed the error.
Incidentally this worked also.
<script language="javascript" src="myJavaScripts.js" type="text/javascript" />
<script></script>
Go figure.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5