-
AuthorPosts
-
February 25, 2009 at 9:02 pm #138573
Hi everyone,
I am having some issues with a script on my page
go to http://www.cfsconline.com and click “your choices”
when browsing with IE 7 or lower, the menu that’s supposed to be on the left is in the middle of the text of the main column. I got some help and it is now formatted correctly and floating as is should. It is fine in FF, and Safari.
how can I get this module to stay in the left column when using IE?
here is the code for that menu, can someone please tell me what’s wrong? I know it is not really a joomla issue but I am pulling my hair out here!
Thanks
<html>
<HEAD><SCRIPT LANGUAGE=”JavaScript”>
<!– Begin
window.onerror = null;
var topMargin = 100;
var slideTime = 1200;
var ns6 = (!document.all && document.getElementById);
var ie4 = (document.all);
var ns4 = (document.layers);
function layerObject(id,left) {
if (ns6) {
this.obj = document.getElementById(id).style;
this.obj.left = left;
return this.obj;
}
else if(ie4) {
this.obj = document.all.style;
this.obj.left = left;
return this.obj;
}
else if(ns4) {
this.obj = document.layers;
this.obj.left = left;
return this.obj;
}
}
function layerSetup() {
floatLyr = new layerObject(‘floatLayer’, pageWidth * .5);
window.setInterval(“main()”, 10)
}
function floatObject() {
if (ns4 || ns6) {
findHt = window.innerHeight;
} else if(ie4) {
findHt = document.body.clientHeight;
}
}
function main() {
if (ns4) {
this.currentY = document.layers[“floatLayer”].top;
this.scrollTop = window.pageYOffset;
mainTrigger();
}
else if(ns6) {
this.currentY = parseInt(document.getElementById(‘floatLayer’).sty le.top);
this.scrollTop = scrollY;
mainTrigger();
} else if(ie4) {
this.currentY = floatLayer.style.pixelTop;
this.scrollTop = document.documentElement.scrollTop;
mainTrigger();
}
}
function mainTrigger() {
var newTargetY = this.scrollTop + this.topMargin;
if ( this.currentY != newTargetY ) {
if ( newTargetY != this.targetY ) {
this.targetY = newTargetY;
floatStart();
}
animator();
}
}
function floatStart() {
var now = new Date();
this.A = this.targetY – this.currentY;
this.B = Math.PI / ( 2 * this.slideTime );
this.C = now.getTime();
if (Math.abs(this.A) > this.findHt) {
this.D = this.A > 0 ? this.targetY – this.findHt : this.targetY + this.findHt;
this.A = this.A > 0 ? this.findHt : -this.findHt;
}
else {
this.D = this.currentY;
}
}
function animator() {
var now = new Date();
var newY = this.A * Math.sin( this.B * ( now.getTime() – this.C ) ) + this.D;
newY = Math.round(newY);
if (( this.A > 0 && newY > this.currentY ) || ( this.A < 0 && newY < this.currentY )) {
if ( ie4 )document.all.floatLayer.style.pixelTop = newY;
if ( ns4 )document.layers[“floatLayer”].top = newY;
if ( ns6 )document.getElementById(‘floatLayer’).style.top = newY + “px”;
}
}
function start() {
if(ns6||ns4) {
pageWidth = innerWidth;
pageHeight = innerHeight;
layerSetup();
floatObject();
}
else if(ie4) {
pageWidth = document.body.clientWidth;
pageHeight = document.body.clientHeight;
layerSetup();
floatObject();
}
}
// End –>
</script></HEAD>
<BODY onLoad=”start()”>
<DIV id=”floatLayer” style=”position: absolute; height:500px; width:200px; left:30px; top:1px;z-index: 100″>
<br>
<br>
<h3> On This Page</h3>
<ol>
<li><a href=”#your_credit”>Your Credit</a>
<li><a href=”#do_it_yourself”>Do It Yourself</a>
<li><a href=”#debt_consolidation”>Debt Consolidation</a>
<li><a href=”#credit_counseling”>Credit Counseling</a>
<li><a href=”#bankruptcy”>Bankruptcy</a>
<li><a href=”#debt_negotiation”>Debt Negotiation</a>
<li><a href=”#credit_card_payment_calculator”>Credit Card Payment Calculator</a>
</DIV>
</BODY>
</html>Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
-
AuthorPosts
This topic contains 3 replies, has 2 voices, and was last updated by solrac28 15 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum