Quote:
Originally Posted by kovidgoyal
You have to put the other properties in quotes, like this
"_TITLE_"
because they are strings, not numbers.
|
Ah - that explains it, I haven't the mindset for JavaScript and when you need quotes or not.
So this is what I ended up with, maybe there's a better way. It puts page headers alternating between author and title starting at page 3
Code:
<p id="pagehead" style="text-align:center; font-size:x-large"></p><script>if ("_PAGENUM_" >2 ) {if ("_PAGENUM_" % 2 === 0) {document.getElementById("pagehead").innerHTML = "_AUTHOR_" }else {document.getElementById("pagehead").innerHTML = "_TITLE_"}}</script><p