---
title: "skicka vidare.."
type: "forum-thread"
url: "https://www.webforum.nu/amne/asp/13881-skicka-vidare"
topic: "ASP"
topic_url: "https://www.webforum.nu/amne/asp"
author: "Choronzon"
published: "2002-01-19T13:48:00.000Z"
updated: "2002-01-19T17:14:00.000Z"
replies: 6
views: 234
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/asp/13881-skicka-vidare"
---

# skicka vidare..

## #1 — Choronzon, 2002-01-19T13:48Z

jag skulle vilja, men hjälp av den här koden som jag hittade här i forumet plocka ut alla med windows och explorer, och skicka dom till en sida, och mac och ns till en annan! Kanske går det att göra enklare? Annars är jag väldigt tacksam om någon skulle vilja hjälpa mig med det!

```
Response.write getOS & " - " & getBrowser
' Hämta användarens webbläsare:
Function getBrowser()
	Dim Browser, ua
	
	ua = Request.ServerVariables("HTTP_USER_AGENT")
	
	If Instr(ua, "MSIE") Then
		If Instr(ua, "MSIE 6.") Then
			Browser = "Microsoft Internet Explorer 6.x"
		ElseIf Instr(ua, "MSIE 5.") Then
			Browser = "Microsoft Internet Explorer 5.x"
		ElseIf Instr(ua, "MSIE 4.") Then
			Browser = "Microsoft Internet Explorer 4.x"
		ElseIf Instr(ua, "MSIE 3.") Then
			Browser = "Microsoft Internet Explorer 3.x"
			If Instr(ua, "MSIE 3.02") Then
				Browser = "Microsoft Internet Explorer 3.02"
			End If
		Else
			Browser = "Microsoft Internet Explorer"
		End If
	ElseIf Instr(ua, "Mozilla") and Instr(ua, "compatible") = 0 Then
		If Instr(ua, "Netscape6") Then
			Browser = "Netscape Navigator 6.x"
		ElseIf Instr(ua, "Mozilla/4") Then
			Browser = "Netscape Navigator 4.x"
		ElseIf Instr(ua, "Mozilla/3") Then
			Browser = "Netscape Navigator 3.x"
		Else
			Browser = "Netscape Navigator"
		End If
	End If
	
	getBrowser = Browser
End Function

'Hämta användarens operativsystem.
Function getOS()
	Dim System, ua, os
	
	ua = Request.ServerVariables("HTTP_USER_AGENT")
	os = Request.ServerVariables("HTTP_UA_OS")
	
	If Instr(ua, "Windows 95") Or Instr(ua, "Win95") Then
		System = "Windows 95"
	ElseIf Instr(ua, "Win 9x 4.90") Then
		System = "Windows ME"
	ElseIf Instr(ua, "Windows 98") Or Instr(ua, "Win98") Then
		System = "Windows 98"
	ElseIf Instr(ua, "Windows 3.1") Or Instr(os, "Win16") Then
		System = "Windows 3.x/Windows NT 3.x"
	ElseIf Instr(ua, "NT 5.1") Or Instr(oa, "NT 5.1") Then
		System = "Windows XP"
	ElseIf Instr(ua, "NT 5") Or Instr(oa, "NT 5") Then
		System = "Windows 2000"
	ElseIf Instr(ua, "NT") Or Instr(oa, "NT") Then
		System = "Windows NT"
	ElseIf Instr(ua, "Mac") Then
		System = "Mac"
		If Instr(ua, "PowerPC") Or Instr(ua, "PPC") Then
			System = "Mac PPC"
		ElseIf Instr(ua, "68000") Or Instr(ua, "68K") Then
			System = "Mac 68K"
		End If
	ElseIf Instr(ua, "Linux") Then
		System = "Linux"
	ElseIf Instr(ua, "X11") Then
		System = "UNIX"
	End If
	
	getOS = System
End Function
```

Permalänk: https://www.webforum.nu/p/13881

## #2 — Vide, 2002-01-19T15:36Z

Typ:

```
if instr( Request.ServerVariables("HTTP_USER_AGENT"), "MSIE" ) > 0 then
response.redirect "ie.asp"
else
response.redirect "nn.asp"
end if
```

Permalänk: https://www.webforum.nu/p/304497

## #3 — Choronzon, 2002-01-19T15:51Z

Jo fast jag vill ju dela på mac & win oxo..

Permalänk: https://www.webforum.nu/p/304498

## #4 — @nders, 2002-01-19T15:55Z

```
strFil = "ie.asp"
if instr( Request.ServerVariables("HTTP_USER_AGENT"), "MSIE" ) <= 0 or instr(lcase(Request.ServerVariables("HTTP_USER_AGENT")), "mac" ) > 0 then strFil = "nn.asp"

Response.redirect fil
```

Känns som att det borde göra susen.

Mvh,

Permalänk: https://www.webforum.nu/p/304499

## #5 — Choronzon, 2002-01-19T16:38Z

hmm, känner mig lite trög, men menar du såhär eller?

```
strFil = "ie.asp"
if instr( Request.ServerVariables("HTTP_USER_AGENT"), "MSIE" ) <= 0 or instr(lcase(Request.ServerVariables("HTTP_USER_AGENT")), "mac" ) > 0 then strFil = "nn.asp" 

[b]Response.redirect ("ie.asp")[/b]
```

Permalänk: https://www.webforum.nu/p/304500

## #6 — @nders, 2002-01-19T16:45Z

Nej, men du har rätt i att jag skrev fel. Jag ber om ursäkt.

```
Response.redirect strFil
```

Mvh,

Permalänk: https://www.webforum.nu/p/304501

## #7 — Choronzon, 2002-01-19T17:14Z

:D :D :D

Permalänk: https://www.webforum.nu/p/304502

---

Tråden på webben: https://www.webforum.nu/amne/asp/13881-skicka-vidare
