Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: detect IIS


Message #1 by "Mihai Cristian Bocai" <mihai.bocai@r...> on Thu, 23 Jan 2003 14:55:48 +0200
> -----Message d'origine-----
> De : Mihai Cristian Bocai [mailto:mihai.bocai@r...]
> Envoy=C3=A9 : vendredi 24 janvier 2003 12:31
> =C3=80 : javascript
> Objet : [javascript] Re: detect IIS
>
>
> I'm trying to do a generic setup application for "web applications"
>
> I'm the sys admin !

	:) :) I see.

	I think this can be done in the other way round: make the server
show who it is instead of making the client guess who the server is.

	I think of something like this:

<script language=3Dvbscript runat=3Dserver>
response.write ("<script>")
if I_am_IIS()
then
	response.write ("isIIS =3D true")
else
	response.write ("isIIS =3D false")
endif
response.write ("</script>")
</script>

	You have to replace I_am_IIS() by something valid, of course :)

	Suppose your server isn't IIS, maybe you would get into the else
clause.  Or maybe it would ignore because it can't interpret vbscript.  
But
if neither of them, you've to think otherwise :)

	Then in your client-side script, you then do
if (isIIS)
	include or execute your stuff

	Well, the idea is like this.  Good luck :)

> However...it can be done with wsh !


  Return to Index