PDA

View Full Version : request.ServerVariables("Server_Name") issued on client



edikaufmann
02-11-2006, 03:16 PM
Hi, ... I have a little blackout. From the client side I like to retrieve the "Server_Name" ?

I always get error msg: Objekt required: 'Request'

? how do I define the object 'request' ? As said I have a blackout ...
of course a JavaScript sample is ok too!

? are there other/easier means to get the "Server_Name"?

Thanks for your help
ed k

<script language="VBscript">
dim ServerName
ServerName = Request.ServerVariables("Server_Name")
alert ([ServerName])
</script>

Twey
02-11-2006, 04:24 PM
Using VBScript is never a good idea. You will get that error message because you are using actual VBScript, rather than the VBScript ASP syntax.

<script type="text/javascript">
window.alert(window.location.host);
</script>
As said I have a blackout ...Je pense que le mot que vous voulez est "problem" :)

edikaufmann
02-12-2006, 07:17 PM
Hi Tway,

.. je vous remercie pour votre aide!
A little hint always helps
Thanks ed