Forums / Developer / How to insert images using javascript / Comment40832
Balaji Ramachandran
Thursday 10 June 2004 3:41:47 am
Sir actually iam trying to convert a finshed web site in Exponential .See what iam trying to do is i wanted the news article to be placed dynamically in the finished website. ihave done but the images what they are displaying is not coming in Exponential.I have transfered all the images in design/news/images.but they have kept in some local folder called images So that myImg var is under confusion how to solve this whther to take the myImg variable and place original name of the jpg as about_03.jpg Exponential style or how to do .but in all methods i have tried it is displaying a plain page or else it is diplaying the page without images when we keep that (myImg="/images/";)local folder name is images dont confuse.
Coding:(javascript)
function fnBuildTopMenu(cIn) { var myImg = "/images/"; var cTemp = ""; cTemp = cTemp + "<TD><IMG SRC=" + myImg + "_03.jpgWIDTH=155 HEIGHT=107></TD>"; cTemp = cTemp + "<TD><IMG SRC=" + myImg + "_04.jpg WIDTH=155 HEIGHT=107></TD>"; cTemp = cTemp + "<TD><IMG SRC=" + myImg + "_05.jpg WIDTH=154 HEIGHT=107></TD>"; cTemp = cTemp + "<TD><IMG SRC=" + myImg + "_06.jpg WIDTH=155 HEIGHT=107></TD>"; }Please help me ,in which way to solve this problem.