I currently have a snippet of text displayed on every page that automatically generates a link for them to use:
Code:
<p class="likeit">Link to this page: <textarea id="codearea" name="codearea" rows="6" cols="60"><a href="<?php echo curPageURL();?>" target="_blank"><?php include ("title.js");?></a></textarea></p>
The page URL is generated through PHP but the title is generated via Javascript. I've now put this text withing a
but the javascript breaks it, so instead of displaying the title like it should do, it simply displays
Code:
<script language="JavaScript">
document.write (document.title)
</script>
.
Is there a way of including the JS within the textarea so it actually works properly, or put it within a php statement, as the
Code:
<?php echo curPageURL();?>
seems to display correctly.
Cheers
