Loading Nested JS Files on the Page
Posted
by Aidin
on Stack Overflow
See other posts from Stack Overflow
or by Aidin
Published on 2010-06-10T20:56:48Z
Indexed on
2010/06/10
21:03 UTC
Read the original article
Hit count: 149
JavaScript
Hi, I have a JS file that is dependent to another Js file. this Js file is something like this (Common.js)
//Some codes here
window.onload = PageLoad;
//some codes here
and then I implement PageLoad function in another Js file. ( I do this because every page has its own PageLoad implementation)
and I Load these files like this on my Main.aspx :
`<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">`
`<\script language="javascript" type="text/javascript" src="PagesJS/pgeMain.js"></script>`
`<\script language="javascript" type="text/javascript" src="JS/Common.js"></script>`
...
...
`</asp:Content>`
Every thing works fine on local but when I deploy it, sometimes I get PageLoad undefined Error!
Can any one tells me what is wrong with this?
Thanks. Aidin
© Stack Overflow or respective owner