View Full Version : Only want to support IE 5.5+ please help edit
JlynnMc10
02-07-2003, 05:35 PM
Could someone help me edit this could so that it only includes what is necessary to support IE 5.5+, because I don't need the rest with what I am doing. Thanks.
JlynnMc10
02-07-2003, 05:36 PM
Or at least just IE 5.0 +
JlynnMc10
02-07-2003, 06:49 PM
How would I change this ConstructObject function so that it is only dealing with IE 5.0+, because I would like to get rid of the verifyCompatibleBrowser function because I only need to support IE 5.0+
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.bw=this.ie5
return this
}
bw=new verifyCompatibleBrowser()
function ConstructObject(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
this.up=MoveAreaUp;this.down=MoveAreaDown;
this.MoveArea=MoveArea; this.x; this.y;
this.obj = obj + "Object"
eval(this.obj + "=this")
return this
}
JlynnMc10
02-07-2003, 06:52 PM
Do I have to check the browser or is there another way I can create the this object I need for the other functions
beetle
02-07-2003, 07:20 PM
This should do it
function ConstructObject(obj,nest)
{
nest=(!nest) ? '':'document.'+nest+'.'
this.el = document.getElementById( obj );
this.css = this.el.style;
this.scrollHeight = this.el.offsetHeight
this.clipHeight = this.el.offsetHeight
this.up = MoveAreaUp;
this.down = MoveAreaDown;
this.MoveArea = MoveArea;
this.x;
this.y;
this.obj = obj + "Object"
eval(this.obj + "=this")
return this;
}
JlynnMc10
02-07-2003, 07:29 PM
Thank you so much it worked great!!!!!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.