Dabei seit: 02.01.2006 Ort: Nürnberg Alter: - Geschlecht: -
Verfasst Fr 06.10.2006 15:43 Titel
Javascript-Newsticker reagiert im IE anders...
Hallo
noch eine Frage:
habe einen Newsticker, dieser funktioniert in jedem Browser wie er soll, ausser im IE. Normalerweise bleibt er bei jedem Punkt stehen und scrollt dann weiter. Im IE scrollt er alle Punkte durch und bleibt erst dann stehen..
Hier der Code:
<script blabla>
var scroller;
scroller = new Scroller(document.getElementById('boundary'), document.getElementById('container'));
scroller.start();
</script>
for (var pos = 0; pos < this.Content.childNodes.length; pos++) {
var node = this.Content.childNodes[pos];
if (node.tagName) {
var delay = node.getAttribute("scrollDelay");
if (delay) {
this.DelayPositions[node.offsetTop] = delay;
}
}
}
}
Scroller.prototype.next = function p_start() {
if (this.Position == this.Content.offsetHeight) {
this.Position = 0;
var c = this.Content;
this.Content = this.SecondContent;
this.SecondContent = c;
this.SecondContent.style.clip = "rect(auto auto auto auto)";
this.Content.style.clip = "rect(auto auto auto auto)";
} else {
this.Position += this.StepSize;
}
var delay = this.StepDelay;
if (this.DelayPositions[this.Position]) {
delay = this.DelayPositions[this.Position];
}
if (this.Position > this.Content.offsetHeight) {
this.Position = this.Content.offsetHeight;
}
this.Content.style.clip = "rect(" + this.Position + " auto auto auto)";
this.Content.style.top = -this.Position;
this.SecondContent.style.top = this.Content.offsetHeight-this.Position;
//SET SCROLLER APPEARANCE AND MESSAGES
var myScroller1 = new Scroller(0, 0, 480, 32, 1, 5); //(xpos, ypos, width, height, border, padding)
myScroller1.setColors("#006600", "#ccffcc", "#009900"); //(fgcolor, bgcolor, bdcolor)
myScroller1.setFont("Verdana,Arial,Helvetica", 2);
myScroller1.addItem("<b>Click here for <a href='http://dynamicdrive.com'>Dynamic Drive</a>, the net\'s #1 DHTML site!</b>");
myScroller1.addItem("<b>Visit <a href='http://www.brainjar.com'>Brain Jar</a>, Mike\'s great coding site!</b>");
myScroller1.addItem("<b>Looking for free JavaScripts? Visit <a href='http://javascriptkit.com'>JavaScript Kit.</a>");
myScroller1.addItem("<b>Discuss and get help on web coding, at <a href='http://www.codingforums.com'>CodingForums.com</a></b>");
//SET SCROLLER PAUSE
myScroller1.setPause(2500); //set pause beteen msgs, in milliseconds
function runmikescroll() {
var layer;
var mikex, mikey;
// Locate placeholder layer so we can use it to position the scrollers.
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst an Umfragen in diesem Forum nicht mitmachen.