I still havent gotten it to work. It is a setting in the php.ini I am sure and I will find it some day lol
BUt in the mean time I can use iframes to get around it
But here is the javascript problem I am having.
I have read the sticky topcs on this subjuect pluys many others but still cannot get it right.
Code: Select all
<script language"javascript" src="scroll.js" type="text/javascript"></script>
<html>
<head>
<title>New Page 1</title>
<style type="text/CSS">
.scrollClass {
text-align:center;
font:normal 8pt Arial,sans-serif;
}
</style>
</head>
<body onLoad="scroller1.scroll();">
<?php
error_reporting(E_ALL); ini_set('display_errors', TRUE);
$test = "test";
?>
<?PHP echo '<script language"javascript" type="text/javascript">
<!--
test = <?PHP echo($test);?>
var scroller1 = new scrollObject("scroller1", "MainName", 120, 120, "white", 1, 60, 30, 0, "scrollClass");
scroller1.blockї1] = "<iframe src=http://mo-avcrad-fs01/invision/ssi.php?a=stats width=150 height=300 frameborder=0></iframe>";
scroller1.blockї1] = "<iframe src=http://mo-avcrad-fs01/invision/ssi.php?a=lasttopics width=150 height=300 frameborder=0></iframe>";
scroller1.blockї2] = "<iframe src=http://mo-avcrad-fs01/invision//ssi.php?a=active width=150 height=300 frameborder=0></iframe>";
scroller1.blockї3] = "'document.write(test)'";
scroller1.blockї4] = "Easy to configure, easy to run, with content automatically centred horizontally and vertically";
scroller1.blockї5] = "Have any number of block scrollers running on a single page all with a single JavaScript";
scroller1.blockї6] = "View the source for more info!";
//-->
</script>'
?>
<?php include("http://dfseals.net/invision/ssi.php?a=lasttopics"); ?>
<?php include("http://mo-avcrad-fs01/invision/ssi.php?a=stats"); ?>
<?php include("invision/hitsfile.txt"); ?>
<iframe src="http://mo-avcrad-fs01/invision/ssi.php?a=lasttopics" width="150" height="300" frameborder="0"></iframe>
<div id="MainName">
The contents of this block will be displayed if the browser does not support the scroller.
It will be overwritten if the scroller is supported.
</div>
</body>
</html>
I have tried several ways to pull the variable out of php so it will show up in a scrolling block but no luck on that either.
Any ideas on this one?
Here is the scroller.js code
Code: Select all
var scObj1 = new scrollObject("scObj1", "sMain", 120, 120, "white", 1.45, 3, 30, 5000, "scrollClass");
scObj1.blockї0] = "This is block 1";
scObj1.blockї1] = "This is block 2, which appears five seconds later";
scObj1.blockї2] = "Blocks can contain any HTML including:";
scObj1.blockї3] = "Images, tables, links and more";
scObj1.blockї4] = "Easy to configure, easy to run, with content automatically centred horizontally and vertically";
scObj1.blockї5] = "Have any number of block scrollers running on a single page all with a single JavaScript";
scObj1.blockї6] = "View the source for more info!";
var scObj2 = new scrollObject("scObj2", "sMain2", 60, 468, "aliceblue", 1.44, 3, 30, 3000, "scrollClass");
scObj2.blockї0] = "<a href="http://www.greywyvern.com" target="_top"><span style="font:bold 36pt fantasy;">Visit GreyWyvern.com!</span></a>";
scObj2.blockї1] = "<a href="http://www.greywyvern.com/forum.php" target="_top"><span style="font-weight:bold;">Home of the GWForum, and webring script (in development)</span></a>";
scObj2.blockї2] = "<a href="http://www.greywyvern.com" target="_top"><img src="http://www.greywyvern.com/img/nav/banner468x60.jpg" border="0"/></a>";
/* **************************************************************************
*** Don't pass this line ****************************************************
************************************************************************** */
function scrollObject(objName, main, height, width, bkgcol, deccel, begin, speed, pause, classname) {
this.objName = objName;
this.main = main;
this.one = main + "Block1";
this.two = main + "Block2";
this.block = new Array();
this.blockup = 1;
this.height = height;
this.width = width;
this.bkgcol = bkgcol;
this.deccel = Math.max(deccel, 1);
this.begin = Math.max(Math.min(begin, this.height), 1);
this.speed = speed;
this.pause = pause;
this.slide = height / this.begin;
this.table = "<table cellpadding="0" cellspacing="0" border="0"><tr><td class="" + classname + "" style="width:" + width + "px;height:" + height + "px;">";
this.scroll = scroll;
this.scrollLoop = scrollLoop;
}
function scroll() {if (!document.getElementById) return false;
document.getElementById(this.main).innerHTML = "<div id="" + this.one + ""></div><div id="" + this.two + ""></div>";
var divList = їdocument.getElementById(this.main), document.getElementById(this.one), document.getElementById(this.two)];
for (var i = 0; i <= 2; i++) {
if (i > 0) {
divListїi].style.position = "absolute";
divListїi].style.left = "0px";
(i == 1) ? divListїi].style.top = "0px" : divListїi].style.top = this.height + "px";
divListїi].innerHTML = this.table + this.blockїi - 1] + "</td></tr></table>";
} else {
divListїi].style.position = "relative";
divListїi].style.background = this.bkgcol;
}
divListїi].style.width = this.width + "px";
divListїi].style.height = this.height + "px";
divListїi].style.overflow = "hidden";
} setTimeout(this.objName + ".scrollLoop();", this.pause);
}
function scrollLoop() {
var divList = їdocument.getElementById(this.main), document.getElementById(this.one), document.getElementById(this.two)];
for (var j = 1; j <= 2; j++) divListїj].style.top = (parseInt(divListїj].style.top) - this.slide) + "px";
this.slide = Math.max(parseInt(this.slide / this.deccel), 1);
if (Math.min(parseInt(divListї1].style.top), parseInt(divListї2].style.top)) <= -this.height) {
this.slide = this.height / this.begin;
if (++this.blockup >= this.block.length) this.blockup = 0;
var wDiv = (parseInt(divListї1].style.top) <= -this.height) ? 1 : 0;
divListї2 - wDiv].style.top = this.height + "px";
divListї2 - wDiv].innerHTML = this.table + this.blockїthis.blockup] + "</td></tr></table>";
divListї1 + wDiv].style.top = "0px";
setTimeout(this.objName + ".scrollLoop();", this.pause);
} else setTimeout(this.objName + ".scrollLoop();", this.speed);
}