Can't get Javascript to run in an included file
Posted: Thu Nov 24, 2005 12:40 am
I'm using tags to pull in a PHP file in the entries.tpl file, like this:
<div class="serendipity_entry_extended"><a id="extended"></a>{$adpanel}{$entry.extended}</div>
(note {$adpanel})
The HTML in the PHP file is being included, but for some reason the Javascript is not working:
<script language="Javascript">
<!--
$refurl = document.referrer;
document.write('<IFRAME SRC="http://www.domain.com/foo/tracker.php?'+$refurl+'" WIDTH=1 HEIGHT=1 FRAMEBORDER=0></IFRAME>');
//-->
</script>
It appears in the outputed source code, but does not run.
Is there something I'm missing here?
<div class="serendipity_entry_extended"><a id="extended"></a>{$adpanel}{$entry.extended}</div>
(note {$adpanel})
The HTML in the PHP file is being included, but for some reason the Javascript is not working:
<script language="Javascript">
<!--
$refurl = document.referrer;
document.write('<IFRAME SRC="http://www.domain.com/foo/tracker.php?'+$refurl+'" WIDTH=1 HEIGHT=1 FRAMEBORDER=0></IFRAME>');
//-->
</script>
It appears in the outputed source code, but does not run.
Is there something I'm missing here?