How can I pass a parameter into the function when I’m building the string linke this ?
[CODE] var tempcontainer=galleryarray[i][3]!=””? ” : “”
tempcontainer+='<img onclick=”ChnageImageSource();” style=”cursor:pointer;cursor:hand;” src=”‘+galleryarray[i][0]+'” border=”1″>’
tempcontainer=galleryarray[i][3]!=””? tempcontainer+'</a>’ : tempcontainer
tempcontainer=galleryarray[i][2]!=””? tempcontainer+'<br />’+galleryarray[i][2] : tempcontainer
What I need to do is pass the URL ( galleryarray[i][0] ) into the ChnageImageSource function that looks like this:
[CODE] function ChnageImageSource(FullImageURL) {
var obj = document.getElementById(“imgFULL”);
obj.src=FullImageURL;
return;
}
The problem is that whenever I enclose the galleryarray[i][0] which holds the URL into ‘ or ” I get an error since both is used to create the tempcontainer string. Is there some workaround ?