PDA

View Full Version : Browser redirect



bellcurve99
03-13-2006, 01:24 PM
http://www.dynamicdrive.com/dynamicindex9/bredirect.htm

Hello,

Im trying to use the script because one of the pages on my site isnt loading properly in IE or opera, http://abelloda.co.uk/projects.htm, its only good in firefox (see attatchment).

I saved the script as redir.htm and put it in my root folder, made an /IE folder with the correct IE settings and changed this bit


//if NS 6
//if (browser_type=="Mozilla Firefox"&&browser_version>=5)
//window.location.replace("http://abelloda.co.uk")
//if IE 4+

if (browser_type=="Microsoft Internet Explorer"&&browser_version>=6)
window.location.replace("http://abelloda.co.uk/IE")
//if NS4+
else if (browser_type=="Opera"&&browser_version>=8)
window.location.replace("http://abelloda.co.uk/IE")
//Default goto page (NOT NS 4+ and NOT IE 4+)
else
window.location="http://abelloda.co.uk"

Anyone got a quick clue please?

mwinter
03-13-2006, 02:29 PM
Im trying to use the script because one of the pages on my site isnt loading properly in IE or opera, http://abelloda.co.uk/projects.htm, its only good in firefox (see attatchment).Then fix the problem. Browser detection is flawed and unreliable.

To begin the process, start by deleting that Dreamweaver-generated junk.


The 'transition' is over: use a Strict document type.
Neither style nor script elements should contain SGML comment declarations.
Don't specify font sizes in pixels. Use percentages, with body text at 100%.
Don't use Verdana (http://www.xs4all.nl/~sbpoley/webmatters/verdana.html).
Class names should be semantic.
A color property declaration should be paired with an explicit background declaration.
Use document structure to identify elements in CSS selectors where possible, rather than excessive use of classes.
The language attribute is deprecated for script elements. Only the type attribute is necessary.
The blockquote element is not for indenting.
Spacer images are abhorrent, and apparently, even the 'inventor' apologised for ever promoting them.
That list of links should be marked up as a list.
Use margins instead of line breaks and empty paragraphs.
Mike

bellcurve99
03-13-2006, 02:33 PM
Thanks, Mike


Then fix the problem. Browser detection is flawed and unreliable.

To begin the process, start by deleting that Dreamweaver-generated junk.


The 'transition' is over: use a Strict document type.
Neither style nor script elements should contain SGML comment declarations.
Don't specify font sizes in pixels. Use percentages, with body text at 100%.
Don't use Verdana (http://www.xs4all.nl/~sbpoley/webmatters/verdana.html).
Class names should be semantic.
A color property declaration should be paired with an explicit background declaration.
Use document structure to identify elements in CSS selectors where possible, rather than excessive use of classes.
The language attribute is deprecated for script elements. Only the type attribute is necessary.
The blockquote element is not for intenting.
Spacer images are abhorrent, and apparently, even the 'inventor' apologised for ever promoting them.
That list of links should be marked up as a list.
Use margins instead of line breaks and empty paragraphs.
Mike