Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-09-2011, 01:54 AM   PM User | #1
nicolethomson
New to the CF scene

 
Join Date: May 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
nicolethomson is an unknown quantity at this point
html4/html5 redirection

I am pretty newbie to web page dev.

../html4/ folder contains html4 compatible web pages
../html5/ folder contains html5 compatible web pages

index.html detects the browser type and redirect page to either html4 or html5

now need to stop users keep moving it manually between these folders

example IE6 browser person types domainname.com/html5/index.html and say's the webpage is not getting displayed.

i tried keepig the following script in individual pages, but it goes in on loop
without displaying the page.


index.html

<script language="JavaScript"
type="text/JavaScript">
if(navigator.appName == "WebTV")
{
window.location = "www.domainname.com/html4/index.html"
}
if(navigator.appName == "Netscape")
{
window.location = "www.domainname.com/html5/index.html"
}
if(navigator.appName == "Safari")
{
window.location = "www.domainname.com/html5/index.html"
}
if(navigator.appName == "Opera")
{
window.location = "www.domainname.com/html4/index.html"
}

if(navigator.appName == "Microsoft Internet Explorer")
{
window.location = "www.domainname.com/html4/index.html"
}
window.location == "Other.html"
</script>
-->

aboutus.html

<script language="JavaScript"
type="text/JavaScript">
if(navigator.appName == "WebTV")
{
window.location = "www.domainname.com/html4/aboutus.html"
}
if(navigator.appName == "Netscape")
{
window.location = "www.domainname.com/html5/aboutus.html"
}
if(navigator.appName == "Safari")
{
window.location = "www.domainname.com/html5/aboutus.html"
}
if(navigator.appName == "Opera")
{
window.location = "www.domainname.com/html4/aboutus.html"
}

if(navigator.appName == "Microsoft Internet Explorer")
{
window.location = "www.domainname.com/html4/aboutus.html"
}
window.location == "www.domainame.com/html4/aboutus.html"
</script>
-->


contactus.html

<script language="JavaScript"
type="text/JavaScript">
if(navigator.appName == "WebTV")
{
window.location = "www.domainname.com/html4/contactus.html"
}
if(navigator.appName == "Netscape")
{
window.location = "www.domainname.com/html5/contactus.html"
}
if(navigator.appName == "Safari")
{
window.location = "www.domainname.com/html5/contactus.html"
}
if(navigator.appName == "Opera")
{
window.location = "www.domainname.com/html4/contactus.html"
}

if(navigator.appName == "Microsoft Internet Explorer")
{
window.location = "www.domainname.com/html4/contactus.html"
}
window.location == "www.domainame.com/html4/contactus.html"
</script>
-->

can any one of you help me pls?
nicolethomson is offline   Reply With Quote
Old 05-09-2011, 06:10 AM   PM User | #2
RedcliffFanboy
New to the CF scene

 
Join Date: Aug 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
RedcliffFanboy is an unknown quantity at this point
Guess I am having the same issue with this. Can anyone help us with this?











___________________________________
My computer is powered by solar panels for homes.
RedcliffFanboy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:05 PM.


Advertisement
Log in to turn off these ads.