It's not the javascript. This file is at http://mydomain.com/dir/test.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<body>
chump here.
<a href="#" onClick="alert('yo momma');">a link</a>
</body>
</html>
You click it and you get the alert with no navigation. The page doesn't change it merely visits the anchor.
I have determined my problem is due to the presence of a base tag. This file behaves differently:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<base href="http://mydomain.com/dir/" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>
<body>
chump here.
<a href="#" onClick="alert('yo momma');">a link</a>
</body>
</html>
I need the base tag because of some mod_rewrite stuff I did for SEO. Without it, all of the images and javascript were breaking. Bottom line: no simple fix. I need to fix all of these links (dozens of them).