I have a bit of Javascript on a page and does not render in Modx. (It is a small picture gallery with image swap.) I have had a hard time finding documentation of Javascript conflicts in Modx.
The script I tried calling in a Chunk. All kinds of conflicts with the front end page editor.
Then tried it as a call using [!ShowStaticHtmlPages?dir=`assets/docs`&index=`picturegallery.htm`!]
The picture components are there but no functionality.
The script works fine outside of Modx framework.
Any thoughts on what conflict might be occurring with the Javascript in Modx?
Here is the code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script>
function kw_switch(i,c) {
d=document;if (d.getElementById){ d.getElementById('kwMain').src=i;
d.getElementById('kw_caption').innerHTML=unescape(c);}
}
</script>
</head>
<body>
<table width="80%" border="0">
<tr>
<td rowspan="2"><table border="0">
<tr>
<td><a href="javascript:;" onClick="kw_switch('Images/112-1268_IMG.JPG','Packers%20Football'); return false;"><img src="Images/112-1268_IMGTHM.jpg" border="0" /></a></td>
</tr>
<tr>
<td><a href="javascript:;" onClick="kw_switch('Images/dean_bugatti01.jpg','Bugatti'); return false;"><img src="Images/dean_bugatti01THM.jpg" border="0" /></a></td>
</tr>
<tr>
<td><a href="javascript:;" onClick="kw_switch('Images/Untitled-3.jpg','Very%20STOL'); return false;"><img src="Images/Untitled-3THM.jpg" border="0" /></a></td>
</tr>
</table>
</td>
<td><img src="Images/112-1268_IMG.JPG" id="kwMain" /></td>
</tr>
<tr>
<td><div id="kw_caption">Packers Football</div>
</td>
</tr>
</table>
</body>
</html>
"Remember what Bilbo used to say: It's a dangerous business, Frodo, going out your door. You step onto the road, and if you don't keep your feet, there's no knowing where you might be swept off to."
-J.R.R. Tolkien from The Lord of the Rings
-
☆ A M B ☆
- 872 Posts
Maybe that Quick Manager is activated. It can cause some incompatibilities.
If so, try to logout from the manager and reload your page.