I am having trouble loading an image in the head commands and then calling for it in 4 different spots throughout the page. I think I am at least doing the first part right(head). I typed it as follows:
var TRB = new Image (22,22)
TRB.src = “../images/Images/topRgborder.bmp”
That part is in the Java Script and I am hoping I got it straight. Now, I need to call for the picture at 4 different places throughout the document, but I only want the picture “TRB” to load at the begining in the head commands. So, unless the first part is wrong, my question is: How do I call for that picture in the document so it appears on the page. Is there a way to call for “TRB” and have the picture stored as variable TRB appear.
Please help me, I’m new at JS.