Hi, All!
I have a problem - I manage two websites, with two different style sheets
(one for each site), but they both share hte same public message boards and
I want to change the CSS used by the forumn template depending on which site
the user came from - this must be done in JScript, as the boards are hosted
offsite and we cannot edit the serverside language.
Unfortunately, its been over two years since I undertook a serious JScript
project and cannot remember alot of what to do. I was planning on this:
<script language=JavaSc ript>
if (document.reffe r="http://www.website1.co m"){
document.write( '<link rel="stylesheet "
href="http://www.website1.co m/css/css.css" type="text/css">
}
else if (document.reffe r="http://www.website2.co m"){
document.write( '<link rel="stylesheet "
href="http://www.website2.co m/css/css.css" type="text/css">
}
else {
document.write( '<link rel="stylesheet " href="css/css.css"
type="text/css">
}
</script>
Can anyone help?
Thanks!
Daniel
I have a problem - I manage two websites, with two different style sheets
(one for each site), but they both share hte same public message boards and
I want to change the CSS used by the forumn template depending on which site
the user came from - this must be done in JScript, as the boards are hosted
offsite and we cannot edit the serverside language.
Unfortunately, its been over two years since I undertook a serious JScript
project and cannot remember alot of what to do. I was planning on this:
<script language=JavaSc ript>
if (document.reffe r="http://www.website1.co m"){
document.write( '<link rel="stylesheet "
href="http://www.website1.co m/css/css.css" type="text/css">
}
else if (document.reffe r="http://www.website2.co m"){
document.write( '<link rel="stylesheet "
href="http://www.website2.co m/css/css.css" type="text/css">
}
else {
document.write( '<link rel="stylesheet " href="css/css.css"
type="text/css">
}
</script>
Can anyone help?
Thanks!
Daniel
Comment