Question about js+css syntax: both css + js are at one specfunc.js included to

NumNoum

New member
php. file: is it good or bad? Question about js+css syntax: both css + js are at one specfunc.js included to php. file: is it good or bad?

The question is about some css code and javascript code that both are included to php file as:
include 'specfunc.js';


So, specfunc.js' looks like:

<style type='text/css'>
....
</style>

<script language="JavaScript" type="text/javascript">
....
</script>



You can ask me why I can't split it into 2 separate files so that files belongs to proper directories of one project? I can, but I don't know if I have to. If I split, I will have 2 files instead of one. Moreover, that both codes are NOT used separately. I mean, they both are downloaded just for one specific html page.


P.S. Just in case you are curious: it works fine when both css and javascript code is in one file, that is included to php file using "include 'specfunc.js';" syntax.

Thank you.
 
Back
Top