I guess I don't get how this works...
I'm trying to fetch text from a <title> tag and put its contents into a <h1> on my front page. Trying to do as the examples have shown me:
This works in a browser, but doesn't in Prince. Any ideas what I could be missing? And while we are at it: is Prince 8.0 coming out soon?
I'm trying to fetch text from a <title> tag and put its contents into a <h1> on my front page. Trying to do as the examples have shown me:
...
<script type="text/javascript">
function init_prince() {
var target = document.createElement("h1");
var source = document.getElementsByTagName("title")[1];
target.textContent = source.textContent;
var page = document.getElementById("front-page");
page.insertBefore(target, page.firstChild);
}
</script>
</head>
<body onload="init_prince();">
...
This works in a browser, but doesn't in Prince. Any ideas what I could be missing? And while we are at it: is Prince 8.0 coming out soon?