It is unclear what the full context of this is. But, if the first snippet from your post is from a script then either:
Code:
<div id=\"collink\" onclick=\"document.getElementById('productimagebox').innerHTML='<img src=\"$imageref\" \" . imageResize($resizedimg[0], $resizedimg[1], 328) . \" />'\"><p>$colour</p></div>
or:
Code:
<div id=\"collink\" onclick=\"document.getElementById('productimagebox').innerHTML='<img src=\\"$imageref\\" \" . imageResize($resizedimg[0], $resizedimg[1], 328) . \" />'\"><p>$colour</p></div>
may do the trick. It would be better to access the the src attribute of the image tag directly, leaving innerHTML to handle only the content of the <p> tag but, that would require those two tags to have either unique id's or guaranteed position in the markup inside an element which has a known id.
Bookmarks