Re: [Roj] Using data in a script
Roj,
This is a tricky one. Making javascript work is a bit outside of our expertise and support but try adding this function to the top of the page:
<?php
function jsEncode($content) {
$content = htmlspecialchars($content);
$content = addcslashes($content, "\\'\r\n");
return $content;
}
?>
Then use this for your mouseover link:
onmouseover="onover('<?php echo jsEncode( $record['fieldname'] ) ?>')"
And I've attached a test file that shows this working with images and content with single and double quotes.
Hope that helps!
Dave Edis - Senior Developer
interactivetools.com