By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,937 Members | 1,532 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,937 IT Pros & Developers. It's quick & easy.

How come my page works in Firefox but not in I E?

P: n/a
What there should be is nice scroll buttons on the top right hand corner
of the page.

Works fine with firefox, but not with I.E.

http://wintergreen.eternalnetworks.com/links.html

Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
In article <pa****************************@yahoo.com.au>,
ch**************@yahoo.com.au enlightened us with...
What there should be is nice scroll buttons on the top right hand corner
of the page.

Works fine with firefox, but not with I.E.

http://wintergreen.eternalnetworks.com/links.html


No doctype. That throws browsers into quirks mode. Probably not what you
really want.

That said,
STOP BROWSER DETECTION. See the 16 thousand other threads in the archives
about how that tends to muck things up.

From your source:
function verifyCompatibleBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;

this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}

Considering that's in there, you're in quirks mode, and your html isn't
valid, you ought to go fix all that before you worry about the rest of the
script. http://validator.w3.org/check?uri=ht...etworks.com%2F


--
--
~kaeli~
When two egotists meet, it's an I for an I.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2

P: n/a
Lee
Dfenestr8 said:

What there should be is nice scroll buttons on the top right hand corner
of the page.

Works fine with firefox, but not with I.E.

http://wintergreen.eternalnetworks.com/links.html


The author seems to have decided that it should not work with
any version of IE except 4 or 5:

function verifyCompatibleBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;

this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}

Jul 23 '05 #3

P: n/a
On Mon, 21 Feb 2005 08:59:47 -0800, Lee wrote:
Dfenestr8 said:

What there should be is nice scroll buttons on the top right hand corner
of the page.

Works fine with firefox, but not with I.E.

http://wintergreen.eternalnetworks.com/links.html

The author seems to have decided that it should not work with any version
of IE except 4 or 5:

function verifyCompatibleBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0; this.ns5=(this.dom &&
parseInt(this.ver) >= 5) ?1:0;

this.ns4=(document.layers && !this.dom)?1:0; this.bw=(this.ie5 ||
this.ie4 || this.ns4 || this.ns5) return this
}
}


Can you hand feed me an alteration to the subroutine to fix that?

Jul 23 '05 #4

P: n/a
Dfenestr8 wrote:
On Mon, 21 Feb 2005 08:59:47 -0800, Lee wrote:

Dfenestr8 said:
What there should be is nice scroll buttons on the top right hand corner
of the page.

Works fine with firefox, but not with I.E.

http://wintergreen.eternalnetworks.com/links.html


The author seems to have decided that it should not work with any version
of IE except 4 or 5:

function verifyCompatibleBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0; this.ns5=(this.dom &&
parseInt(this.ver) >= 5) ?1:0;

this.ns4=(document.layers && !this.dom)?1:0; this.bw=(this.ie5 ||
this.ie4 || this.ns4 || this.ns5) return this
}
}

Can you hand feed me an alteration to the subroutine to fix that?


Presuming browser detection is needed at all (and it isn't),
no change is required. IE 6 will be identified as "dom", which
probably just as suitable as any other classification you may
want to give it.

Incidentally:

this.dom = document.getElementById ? 1 : 0;

Could be more simply written as:

this.dom = document.getElementById;

If document.getElementById is undefined, the so will this.dom
and any test of it will return false. Vice versa if the
original test is true (goes for all the global variables you
have initialised the same way).

Please read up on feature detection, it is much simpler and
cleaner and makes no assumptions about the user agent based on
support for a single feature.
--
Fred
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.