Thanks for the reply,
The following line of javascript is supposed to open a window displaying an image but the code doesn't seem to work, ie. nothing happens when I click the smaller image:
onclick="openDMXzoneLightbox('../../../images/catalogue/business/corporate/Large/<?php echo $item['itemImage'] . '.jpg'; ?>', {title:'<?php echo $item['itemTitle'];?>', width:650, height:776}, window);return document.MM_returnValue">
The following shows the above code in the context of some surrounding code:
<div id="catalogue">
<div class="dmxBillboard dark_blue" id="Corporate" style="width:656px;height:396px;">
<div class="dmxBillboardHeader">
<h3>Corporate Wear</h3>
<div class="dmxBillboardSectionNav">
<a href="*"><?php echo $items[0]['itemType'];?></a>
<div style="clear:both"></div>
</div>
<div style="clear:both;"></div>
</div>
<div class="dmxBillboardView layout-left">
<ul id="sec_1" title=""><?php foreach ($items as $item): ?>
<li class="layout-full" onclick="openDMXzoneLightbox('../../../images/catalogue/business/corporate/Large/<?php echo $item['itemImage'] . '.jpg'; ?>', {title:'<?php echo $item['itemTitle'];?>', width:650, height:776}, window);return document.MM_returnValue">
<a href="javascript:void(0);" onclick="openDMXzoneLightbox('../../../images/catalogue/business/corporate/Large/<?php echo $item['itemImage'] . '.jpg';?>', {title:'<?php echo $item['itemTitle']?>', width:650, height:776}, window);return document.MM_returnValue">
<img src="../../../images/catalogue/business/corporate/<?php echo $item['itemImage'] . '.jpg';?>" border="0" width="650" height="776" alt="" />
</a>
</li>
The following shows some code that's generated by the browser:
div id="content">
<div id="content_main">
<div id="catalogue">
<div class="dmxBillboard dark_blue" id="Corporate" style="width:656px;height:396px;">
<div class="dmxBillboardHeader">
<h3>Corporate Wear</h3>
<div class="dmxBillboardSectionNav">
<a href="*">Shirts/Blouses</a>
<div style="clear:both"></div>
</div>
<div style="clear:both;"></div>
</div>
<div class="dmxBillboardView layout-left">
<ul id="sec_1" title=""> <li class="layout-full" onclick="openDMXzoneLightbox('../../../images/catalogue/business/corporate/Large/160_260.jpg', {title:'Men\'s Shirt ', width:650, height:776}, window);return document.MM_returnValue">
<a href="javascript:void(0);" onclick="openDMXzoneLightbox('../../../images/catalogue/business/corporate/Large/160_260.jpg', {title:'Men's Shirt ', width:650, height:776}, window);return document.MM_returnValue">
<img src="../../../images/catalogue/business/corporate/160_260.jpg" border="0" width="650" height="776" alt="" />
</a>
</li>
<li title="Men\'s Shirt ">
<h4> Men's Shirt </h4>
<p>Style Numbers – Ladies: 000, 161 | Men: 123, 456</p>
<p>Colours: White, Navy,</p>
<p><img src="../../../../images/corp/corporate/shirts/swatches/160_260" border="0" alt="" /></p><p>Sizes: 38-50</p> </li>
As you can see, it's outputting a backslash before the apostrophe in Men\'s.
As mentioned, when I use the following:
<?php echo addslashes($item['itemTitle']);?>
...the onclick even works, but I'm stuck with the backslash being output.