SitePoint Sponsor |
|
User Tag List
Results 1 to 19 of 19
Thread: Calling in a file
Threaded View
-
Feb 18, 2003, 19:08 #1
Calling in a file
Hey,
Having trouble calling in a file through javascript. I don't know any JS, but Wayne helped me out a little.
I stick this in a page which can go anywhere on the internet:
Code:<script language="JavaScript 1.2" src="http://www.filetrack.com/version.php?currentversion=<?=$currentversion?>"></script>
PHP Code:<?php
@include 'version.inc';
echo "Your Version: $currentversion\n";
echo "Newest Version: $newestversion\n";
?>
<script language="JavaScript 1.2" type="text/javascript">
<?php
echo ("document.write ('<!-- Version --><table><tr><td align=\"center\" bgcolor=\"#FFFFCC\">');\n");
if ($currentversion != $newestversion) {
echo ("document.write('<strong>A newer version of FileTrack is now available.</strong>');\n");
echo ("document.write('Your version: <strong>". $currentversion ." | </strong>Newest version: <strong>". $newestversion ."</strong>');\n");
echo ("document.write (' <strong><a href=\"http://www.filetrack.com/\">Update Now<a></strong></td></tr></table> <!-- /Version -->');\n");
}
else {
echo ("document.write ('Version: <strong>". $currentversion ."</strong></td></tr></table><!-- /Version -->');\n");
}
?>
</script>
Bookmarks