Page 2 of 2

Okay using the above example I tried this.....

Posted: Fri May 09, 2003 10:57 am
by jkmcgrath
<?php $latestFile = "article/latest.php"; ?>
<script language"javascript" type="text/javascript">
<!--
var scroller1 = new scrollObject("scroller1", "MainName", 140, 125, "#cdcdcd", 1.45, 3, 30, 2000, "scrollClass");
scroller1.block[0] = "<img src=images/pullups.gif>";
scroller1.block[1] = "Have you got what it takes?";
scroller1.block[2] = "<img src=images/jumping_jacks.gif>";
scroller1.block[3] = "The burning desire to excell?";
scroller1.block[4] = "<img src=images/pushups.gif>";
scroller1.block[5] = "THe MO-AVCRAD does!";
scroller1.block[6] = "<?php echo $latestFile; ?>";
ouputs article/latest.php

And I want it to display the file

I tried single quotes on the $latestFile and also tried required but they were dead ends also :(

Posted: Fri May 09, 2003 11:58 am
by volka
of course it does. If you set $latestFile to 'lalala' the client will receive scroller1.block[6] = "lalala";. php might be ingenious but certainly not clairvoyant ;)
What do you want? The contents of article/latest.php or the result of the script's runs?

Posted: Fri May 09, 2003 12:02 pm
by jkmcgrath
The result the script runs.

I am sorry for being such a pain :? And I appreciate your help very much.

I understand that I must first get the result into a variable before it leaves the server so that javscript can display it on the client. But my inexperience really shows while trying to acomplish this.

Needless to say I am over my head but I just hate to give up at anything :wink: