First of all there is hardly any documentation to be found about how the javascript engine works. It took me quite a while to realize the --javascript option is not included in the official PHP wrapper. I added it in there myself and confirmed in the logs that it is running with javascript enabled now:
I've tried linking the script file with this in the head of the html document:
with some simple javascript:
and it doesn't work. Am I doing something wrong? I also tried to run the code without the src link in the html file directly such as:
to no avail. How the heck do I get javascript to run??
Mon Sep 19 16:14:37 2011: ---- begin
Mon Sep 19 16:14:38 2011: Loading document...
Mon Sep 19 16:14:38 2011: Running scripts...
Mon Sep 19 16:14:38 2011: Converting document...
Mon Sep 19 16:14:38 2011: Resolving cross-references...
Mon Sep 19 16:14:38 2011: finished: success
Mon Sep 19 16:14:38 2011: ---- end
I've tried linking the script file with this in the head of the html document:
<script src="/path/to/file.js" type="text/javascript"></script>
with some simple javascript:
element = document.getElementById("the_body");
element.style.color = "red";
and it doesn't work. Am I doing something wrong? I also tried to run the code without the src link in the html file directly such as:
<script type="text/javascript">
// same javascript code as above...
</script>
to no avail. How the heck do I get javascript to run??