cs.punk Posted February 24, 2011 Share Posted February 24, 2011 Urggggh what am I doing wrong? <script type="text/javascript" src="js.js" /> js.js just conatins alert("hello"); When I don't include it, everythings fine, but as soon as I add that boom my page goes blank. I have tried DOM inspector in FireFox and it seems it's not getting anything from the body element... Thank you... Quote Link to comment Share on other sites More sharing options...
sunfighter Posted February 25, 2011 Share Posted February 25, 2011 You load external scripts with an include or a require. LIke this <?php require (js.js'); ?> OR like what your doing: <script type="text/javascript" src="javasct.js"></script> The corrected version with the </script> tag. When done this way the script your calling can not have the <script> tags. Quote Link to comment Share on other sites More sharing options...
cs.punk Posted February 25, 2011 Author Share Posted February 25, 2011 I'll give it a try! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.