Click to See Complete Forum and Search --> : include file


chriscam19
02-28-2003, 07:02 PM
i am still confused. ok lets talk about the code that i want to put in the include file. Is that suppose to be set up in html format? like am i suppose to write the include file like this:
<html>
<head>
<body>
code
</body>
</html>

or do i write the include file like this:

only code

now the next problem is once i get the include file straight am i suppose to write
<script language="javascript" type="text/javascript" src="webtrendscode.js"></script>

in between the <head></head> or the <body></body>

MikeOS
02-28-2003, 08:14 PM
You don't need to include the <html> or <body> tags in the include file, only the elements you need. Remember when output to the browser the file is INCLUDED in the output, that is why you don't need to include those elements again.

If you are referencing an external file then your scirpt tag is fine.

AdamBrill
02-28-2003, 10:55 PM
Unless your script has to go in the body for some reason, I would put it in the head. That way it will run before the rest of the page loads.

Charles
03-01-2003, 07:28 AM
I think that the problem here is that chriscam19 is trying to include something that is not a script and should not be using the SCRIPT element. He or she should explore what server side methods are available.