Dynamically loading images
Please for give the duplicate posting, but I was told that I should have put this here instead of the ASP forum.
I'm trying to figure out how to load images directly into a panel control. I already know how to set constants in my scripts, as in this example:
var normColor = "#000000";
var PALE_YELLOW = "#FFFFC0";
var LIGHT_YELLOW = "#FFFF80";
var PALE_GREEN = "#C0FFC0";
var varHeight = "60px";
but I can't find any way to pass variables into an <img> tag.
The only way i know how to put images into a panel are in the HTML markup, where I need to specify each tag explicitly.
In the example below, i'd like to replace height="60px" with something like height="varHeight" but nothing I try seems to work. Is it as simple as a syntax issue, or am I trying to do something that can't be done inside of an <img> tag?
Here's the example -
<img id="Img1" src="Images/A0812300.JPG"
onclick="return IMG1_onclick()" height="60px"
style="position: relative; left: 8px; top: 0px; width: 78px; border-right: 1px solid;
border-top: 1px solid; border-left: 1px solid; border-bottom: 1px solid;" />