473,386 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

View different Pages on firefox or IE

4
I looking for one were you go to a site and if you using mozilla firefox. it will redirect you to index_firefox.html. If you using ie it will be index_IE.html.


For example: you go to www.website.com using your firefox and the index page will redirect to the right browser page like index_firefox.html.


If you use IE. it will redirect you to index_IE.html



I use to have a script before but I lost it.
Nov 18 '06 #1
4 2646
AricC
1,892 Expert 1GB
Here is how you find the browser just replace alert with redirect.



Expand|Select|Wrap|Line Numbers
  1. <HEAD>
  2. <SCRIPT language="JavaScript">
  3. <!--
  4. var browserName=navigator.appName; 
  5. if (browserName=="Netscape")
  6. alert("Hi Netscape User!");
  7. }
  8. else 
  9. if (browserName=="Microsoft Internet Explorer")
  10. {
  11. alert("Hi, Explorer User!");
  12. }
  13. else
  14. {
  15.     alert("What ARE you browsing with here?");
  16. }
  17. }
  18. //-->
  19. </SCRIPT>
  20. </HEAD>
Nov 18 '06 #2
Binary
4
I try redirect and did not work or some reason.

Expand|Select|Wrap|Line Numbers
  1. <HEAD>
  2. <SCRIPT language="JavaScript">
  3. <!--
  4. var browserName=navigator.appName; 
  5. if (browserName=="Netscape")
  6. redirect("http://blank.com/Netscape.html");
  7. }
  8. else 
  9. if (browserName=="Microsoft Internet Explorer")
  10. {
  11. redirect("http://blank.com/IE.html");
  12. }
  13. }
  14. //-->
  15. </SCRIPT>
  16. </HEAD>
  17.  
  18.  
  19.  
Nov 18 '06 #3
Binary
4
Nvm I found a new way.

Expand|Select|Wrap|Line Numbers
  1.  
  2. <SCRIPT><!--Free Browser Detection Forwarding Script Code Found At http://www.DesignerWiz.com-->
  3. <!--Development Resource & JavaScript Public Archive Center-->
  4. browser = navigator.appName
  5. ver = navigator.appVersion
  6. version = ver.substring(0,1)
  7. if (browser=="Netscape") {
  8.   if (version=="3")
  9.     document.location.href=""
  10.   if (version=="4")
  11.     document.location.href=""
  12. }
  13. if (browser=="Internet Explorer") {
  14.   if (version=="3")
  15.     document.location.href=""
  16.   if (version=="4")
  17.     document.location.href=""
  18.   if (version=="5")
  19.     document.location.href=""
  20. }
  21. </SCRIPT>
  22.  
  23.  
Nov 18 '06 #4
Binary
4
nevermind on my last 2 topics. This one really works. Thank you!

I just added document.location.href=

Expand|Select|Wrap|Line Numbers
  1. <HEAD>
  2. <SCRIPT language="JavaScript">
  3. <!--
  4. var browserName=navigator.appName; 
  5. if (browserName=="Netscape")
  6. document.location.href=("Netscape.html");
  7. }
  8. else 
  9. if (browserName=="Microsoft Internet Explorer")
  10. {
  11. document.location.href=("IE.html");
  12. }
  13. }
  14. //-->
  15. </SCRIPT>
  16. </HEAD>
Nov 18 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Droolboy | last post by:
I'm trying to build a fairly small (max. 10 different pages) site using php, and it's becoming obvious that I need some kind of model view separation. Having done a few searches, I've come...
4
by: pmud | last post by:
Hi I have a website (ASP.NET project using C# ) which is already put up on the server. I need to make some modification to some web pages.So the project files were copied to the a different server...
8
by: news | last post by:
I seriously doubt this is possible...but you never know, so here goes. Due to bad pre-planning I have a Web page that is VERY table heavy with a very complicated and delicate setup. Any changes...
6
by: dgk | last post by:
View Source won't work. I checked Google, there were quite a few suggestions. Cookies are not turned off. Notepad is where it is supposed to be. I emptied the temporary internet files. I searched...
7
by: chrisn | last post by:
Do real developers use the design view? Thought it would be interesting to start a debate on this subject. According to all the MCP materials (yes, I know a bit mickey mouse), the design view...
61
by: phil-news-nospam | last post by:
Why does SVG need a different tag than other images? IMHO, SVG should be implemented as an image type just like any other image type, allowing it to work with <img> tags, and ... here is the...
5
by: cjl | last post by:
Hi. I am trying to screen scrape some stock data from yahoo, so I am trying to use urllib2 to retrieve the html and beautiful soup for the parsing. Maybe (most likely) I am doing something...
2
by: skijor | last post by:
For a page that display's a catalogue of items in table format. If the number of rows extends below the view, in some browsers (safari, firefox) the page shifts to the left a little bit. It's...
8
by: jeanluc | last post by:
I am in the process of developing material that to be used for technical software training. The material would be *.html based. Ideally, I want web software to create two different options for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.