Or, at least, I think it is.
The first page with the menu works just fine, but when you go to any of the other pages it won't let you highlight the text to copy and paste - in certain circumstances.
It works fine on my home computer which is running Windows XP. I've been able to work with it in all browsers.
On Windows Vista and Windows 7 there are issues. The only real difference is the previous/next page menu and the switch div script which is written in Javascript. This is the only thing I can think that's interfering. I've only tested Internet Explorer and Chrome in Vista (don't know about Chrome in 7) but it inhibits in both browsers.
Does anyone have any ideas as to why? Might there be any work arounds? On 14.html which is the Index (as in book, not the main web page) the switch div is gone but it's still not working. However, I tested just the switch div script on another web-site without the previous/next page menu and that also doesn't work.
This is the javascript for the previous/next menu:
/*Put in the html <head> tags.*/
<script>
function nextPg(step) {
var str = window.location.href;
if(pNum = str.match(/(\d+)\.htm/i)){
pNum = pNum[1] * 1 + step+'';
if(pNum>0){
pNum = "".substr(0, 4-pNum.length)+pNum;
window.location = str.replace(/\d+\.htm/i, pNum+'.htm');
}
}
}
</script>
/*Put in the body.*/
<a href="javascript:nextPg(-1)">« Previous Page</a></div><div style="width: 333px; float: left; text-align:center;"><a href="index.html">Table of Contents</a></div><div style="float:right;"><a href="javascript:nextPg(+1)">Next Page »</a>
This is the switch div code:
/*Put in the html <head> tags.*/
<script type="text/javascript">
/*
Script made by Martial Boissonneault © 2001-2003 http://getElementById.com/
This script may be used and changed freely as long as this msg is intact
Visit http://getElementById.com/ for more free scripts and tutorials.
*/
function SwitchMenu(obj){
if(document.getElementById){
var el = document.getElementById(obj);
var ar = document.getElementById("cont").getElementsByTagName("DIV");
if(el.style.display == "none"){
for (var i=0; i<ar.length; i++){
ar[i].style.display = "none";
}
el.style.display = "block";
}else{
el.style.display = "none";
}
}
}
function ChangeClass(menu, newClass) {
if (document.getElementById) {
document.getElementById(menu).className = newClass;
}
}
document.onselectstart = new Function("return false");
</script>
/*Put in the body.*/
<a href="javascript:SwitchMenu('sub1')">/*IMAGE HERE*/</a>
<div id="sub1" style="display:none;">/*HIDDEN DIV CONTENT*/</div>