Dec 07, 2011, 1:29 AM
How to reference External Javascript Files????
1. This works!
2. This does not!
******* login.js **********
***********************
IE 7 (doesn't work)
IE 9 (doesn't work)
VS 2010
.Net Framework 4
Ext.Net 1.2.0.21945
<head id="Head1" runat="server">
<title>Ext.Net Example</title>
<ext:ResourcePlaceHolder ID="ResourcePlaceHolder1" runat="server" Mode="ScriptFiles" />
<script type="text/javascript">
window.onload = alert('hi there');
</script>
</head>
2. This does not!
<head id="Head1" runat="server">
<title>Ext.Net Example</title>
<ext:ResourcePlaceHolder ID="ResourcePlaceHolder1" runat="server" Mode="ScriptFiles" />
<script type="text/javascript" language="javascript" src="Scripts/login.js"></script>
<script type="text/javascript" id="Script1" language="javascript">
window.onload = nsLogin.TestIt();
</script>
</head>
******* login.js **********
var nsLogin = new function () {
this.TestIt = function () { alert('hi there'); }
}
***********************
IE 7 (doesn't work)
IE 9 (doesn't work)
VS 2010
.Net Framework 4
Ext.Net 1.2.0.21945
Last edited by geoffrey.mcgill; Dec 07, 2011 at 2:41 AM.
Reason: please use [CODE] tags