Flying Sagittarius Posted August 13, 2008 Share Posted August 13, 2008 I try to keep as much PHP code as possible at the top, before the <html> tag. Can I do the same with Javascripts? Quote Link to comment Share on other sites More sharing options...
haku Posted August 13, 2008 Share Posted August 13, 2008 No. Or at least, not validly. It may work, but it may also cause you problems in some browsers. It either has to be between the head tags, or between the body tags. Quote Link to comment Share on other sites More sharing options...
RichardRotterdam Posted August 13, 2008 Share Posted August 13, 2008 most definitly not your browser will never see a bit a php code since its processed on the server your javascript will be visible for the browser to read and this must always be either in the head or body section Quote Link to comment Share on other sites More sharing options...
Flying Sagittarius Posted August 13, 2008 Author Share Posted August 13, 2008 Ok, thanks. 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.