You need to quote your strings and declare your variables:
Code:
<%
Dim domainname
domainname = Request.ServerVariables("SERVER_NAME")
response.write domainname
IF domainname = "www.tascomms.co.uk" THEN
%>
<link rel="stylesheet" href="css/screen.css" type="text/css" media="screen" />
<%
END IF
IF domainname = "www.tascomms.mobi" THEN
%>
<link rel="stylesheet" href="css/handheld.css" type="text/css" media="handheld" />
<%
END IF
%>
Also - here is cleaner, failsafe code:
Code:
<%
Dim DomainName, StyleSheet
DomainName = LCase(Request.ServerVariables("SERVER_NAME"))
If Left(DomainName, 4) = "www." Then DomainName = Right(DomainName, Len(DomainName) - 4)
Select Case DomainName
Case "tascomms.co.uk"
StyleSheet = "screen"
Case "tascomms.mobi"
StyleSheet = "handheld"
End Select
%>
<link rel="stylesheet" href="css/<%=StyleSheet%>.css" type="text/css" media="<%=StyleSheet%>" />
Bookmarks