[thelist] Re: Moving a <div> with javascript
Robert Vreeland
vreeland at studioframework.com
Tue Mar 11 15:50:31 CST 2003
Opps sorry,
my last posting will probably not make much sense without the browser detection routine I use, so here it is:
var isNet4, isIE4, isNet6;
// browser detect
if ( navigator.appVersion.substring(0, 1) >= 4) {
if ( navigator.appName == "Netscape" ) {
if ( navigator.appVersion.substring(0, 1) >= 5 ) {
isNet6 = true;
} else {
isNet4 = true;
}
}
if ( navigator.appName == "Microsoft Internet Explorer" ) {
isIE4 = true
}
}
if (isNet4) {
doc = "document.";
forstyle = "";
forid = "";
htm = ".document";
winWidth = "window.innerWidth";
winHeight = "window.innerHeight";
} else if (isIE4) {
doc = "document.all.";
forstyle = ".style";
forid = "";
htm = "";
winWidth = "document.body.clientWidth";
winHeight = "document.body.clientHeight";
} else if (isNet6) {
doc = 'document.getElementById("';
forstyle = '").style';
forid = '")';
htm = "";
winWidth = "window.innerWidth";
winHeight = "window.innerHeight";
}
Robert
vreeland at studioframework.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/thelist/attachments/20030311/bf7d7a10/attachment.htm>
More information about the thelist
mailing list