07-24-2023, 09:15 AM
function pushImage () {
var img = new Image();
img.src = '/waroot/chart/chart.png';
document.getElementById("test1").innerHTML = "<img src='/waroot/chart/chart.png'>";
document.getElementById("test2").innerHTML = img;
}
Test 1 works and shows the image, but test 2 doesn't. I am not sure how to solve it but i will need the way test 2 works further along my project since i'm going to have to circle through a large amount of images.
The images are created by `JFreeCharts`, saved to `png` and then have to be posted to a site. As a side question: is it possible to push the freecharts objects straight to the `jscript` instead of having to save them prior (i could throw them into the dictionary and then look them up later but i'm not sure if this works)
var img = new Image();
img.src = '/waroot/chart/chart.png';
document.getElementById("test1").innerHTML = "<img src='/waroot/chart/chart.png'>";
document.getElementById("test2").innerHTML = img;
}
Test 1 works and shows the image, but test 2 doesn't. I am not sure how to solve it but i will need the way test 2 works further along my project since i'm going to have to circle through a large amount of images.
The images are created by `JFreeCharts`, saved to `png` and then have to be posted to a site. As a side question: is it possible to push the freecharts objects straight to the `jscript` instead of having to save them prior (i could throw them into the dictionary and then look them up later but i'm not sure if this works)