Quote:
|
Originally Posted by dpsleep
im working with prototype.js and thickbox trying to insert the image data from http://software.hixie.ch/utilities/cgi/data/data into the js.i wanted to change
$("body").append("<div id='TB_load'><div id='TB_loadContent'><img src='pictures/circle_animation.gif' /></div></div>");
to
$("body").append('<div id='TB_load'><div id='TB_loadContent'><img src="image data" /></div></div>');
the only problem is the image data has a bunch of single quote marks in it.
anyone has an idea on what i should do here?
|
That's nowhere near the only problem. I have no idea what $("body") means, but I can guess you're trying to do something like this:
image = document.createElement("img");
image.src = "my_image.png";
image.alt = "Picture!!!11";
holder = document.createElement("div");
holder.id = "TB_load";
holder.appendChild(image);
body = document.getElementsByTagName("body")[0];
body.appendChild(holder);
Disclaimer: not tested - there's likely to be a bug or two.