Hi,
I have a gallery that when the image is clicked a window pops up with a description.
the description is in the xml file
but if i have a special character ( ’ apostrophe )i n the xml file the pop up will not work open
I tried cdata but not sure how to implement that.
The gallery was built in flash and but the pop up is html
here is the java is sits in an html page where the flash is embedded
do i need to tell the javascript that i am using cdata?
any help would be great.
Thanks
Ponyack
<script language="JavaScript" type="text/javascript">
function popUp(target, w, h, path, caption, description){
var scrW = screen.width;
var scrH = screen.height;
var x = Math.floor((scrW - w)/2);
var y = Math.floor((scrH - h)/2);
var uri = target + "?path=" + path + "&caption=" + caption + "&description=" + description;
wnd = window.open(uri, 'galleryImage', 'height=' + h + ', width=' + w + ', left=' + x + ', top=' + y + ', toolbar=no, location=no, directories=yes, status=no, menubar=yes, scrollbars=yes, resizable=yes');
}
function cleanPopUp(w, h, path){
var scrW = screen.width;
var scrH = screen.height;
var x = Math.floor((scrW - w)/2);
var y = Math.floor((scrH - h)/2);
wnd = window.open('', 'galleryImage', 'height=' + h + ', width=' + w + ', left=' + x + ', top=' + y + ', toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no');
wnd.document.write('<body topmargin=0 bottommargin=0 rightmargin=0 leftmargin=0>');
wnd.document.write('<img src="' + path + '" />');
wnd.document.write('</body>');
}
</script>