How: Including a file in the Head Tag.

[email protected] ("Jess")
Newsgroups php.general
Message-ID <[email protected]>
I hope you can assist me with a problem I am having that I have not been
able to find a solition.
There is a Javascript that I need to include between the <HTML> and <HEAD>
tags. Copying via cut and paste is not a problem, but that makes switching
the code off and on very labour intensive. The reason I need to switch it
off is I create the web site off line on a win98 system.  I have tried
"include" but that doesn't seem to work in the HTML tag section.

The general idea was to put an include tag to the file which contained the
javascript (domain.inc) in the <HTML> tag and then either remove the java
script from within the domain.inc file to disable the script function. To
re-enable the script is just a matter of copy the script back into the
domain.inc file.

I am currectly reading your HTML tutorial to see if I can get any help from
it.  I have also read other html tutorials but they don't seem to get into
this area.

I would be greatfull for any assistence or guidence.



<HTML>
<script language="JavaScript">
<!-- hide this stuff from other browsers
// automatically forward user to a sub domain
var hostname = location.hostname // capture the current hostname from the
browser
var temphn = new String(hostname) // convert the current hostname to a
string
var lchostn = temphn.toLowerCase() // convert the current hostname to lower
case
if (lchostn.indexOf("peoplemandate.com") < 0) { // reassign hostname to
subdomain
location.hostname = "www.peoplemandate.com"
}
// end the hiding comment -->
</script>
<HEAD>
</HEAD>
</HTML>



Regards Jess
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.