Encountering a strange issue on an ASP.NET page - the JavaScript file reference below functions correctly in IE6:
<script src='~/Scripts/xxx.js' type="text/javascript"></script>
However, it fails to work in IE7/8, resulting in an "object required" error upon page load. Changing the reference to the following resolves the issue:
<script src='<%# ResolveUrl ("~/Scripts/xxx.js") %>' type="text/javascript"></script>
Any insights into why this is happening would be greatly appreciated. Thank you.