Forum Moderators: open

Message Too Old, No Replies

Server_Name

         

stevelibby

7:11 pm on Feb 22, 2006 (gmt 0)

10+ Year Member



Hi All
Got a tricky question for you
I have a few web sites that feed from one db but have a clicktracker like program running on it too.
In order for me to be able to keep all sites seperate i use [<%=Request.ServerVariables("server_name")%>...] and then the path info for the clicktracker this works absolutly fine.
I have created a banner db. All html...img path and hyper link comes from one field, i create the table within the field that way i have the versatility to either have a banner or text, now the fun part is to do hyperlink i need to use <%=Request.ServerVariables("server_name")%> or something close, however with <%=Request.ServerVariables("server_name")%> placed in a field it does not work.
Any ideas.

Easy_Coder

10:30 pm on Feb 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I usually get the server name like this:

Public Function utilGetMachineName()
Set oWSHNetwork = CreateObject("WScript.Network")

retVal = oWSHNetwork.ComputerName
set oWSHNetwork = Nothing

utilGetMachineName = retVal
End Function

Response.Write utilGetMachineName()

It never fails me... sometimes the server variables do.

Based on the machine name you can draw your url...

stevelibby

10:44 pm on Feb 22, 2006 (gmt 0)

10+ Year Member



sorry i am not so sure i understand that, what do i do and how?
Bear in mind that i am entering code into a field.

celgins

1:29 pm on Feb 23, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



So if you assign a variable to "Request.ServerVariables("server_name")" and use that variable in the field, it doesn't work?