Solved

browser detection with autoloading

Posted on 1997-05-05
1
203 Views
Last Modified: 2010-04-16
hi !

i am currently working on my website and would need a small java script,
which detects the visitors browser (just needs to differ between netscape
and internet explorer) and than automatically loads a different side for
each of the two browsers. all other browsers (that can be recogniced) should load the internet explorer page, too.
can someone help me on that problem, since i can't program java.

i would really appreciate any help

thanks in advance

oliver burgis
0
Comment
Question by:oburgis
1 Comment
 

Accepted Solution

by:
Bill_Mair earned 100 total points
ID: 1220115
Here's how:

<SCRIPT LANGUAGE="JavaScript">
  <!-- Hide the code from all well-behaved non-JS browsers
  if( navigator.appName == "Netscape" )
  {
    location = 'http://www.bm-soft.com'
  }
  else
  if( navigator.appName == "Microsoft Internet Explorer" )
  {
    location = 'http://www.softwarezentrum.de'
  }
  else
  {
    location = 'http://www.bm-soft.com'
  }
  // Unhide. -->
</SCRIPT>


OK ?
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
micro services spring boot application error 3 185
Spring Framework HTTPSession management 1 33
check java version using powershell 13 82
Java string replace 11 43
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question