nicolethomson
05-09-2011, 12:30 AM
Greetings all
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
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?
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
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?