Check For VBScript

This example shows a simple way to check for the availability of VBScript in a users browser . As far as I am aware VBScript is only supported with Internet Explorer or with a plug-in for Netscape Navigator. Certainly Opera does not . In this example we will display a message but a more practical example would be to do an actual redirect to another page

Here is the code.

<%
Dim objBrowser , blnVBScript
Set objBrowser = Server.CreateObject("MSWC.BrowserType")
blnVBScript = objBrowser.VBScript
If blnVBScript Then
Response.Write "VBScript is supported in this browser"
Else
Response.Write "VBScript is unavailable in this browser"
End If
%>

If you wanted to redirect to another page you could use Response.Redirect "url" , the url being the page you wish to redirect to . Or you could use either Server.Execute "url" or Server.Transfer "url"

 

Sponsors