Joomla, JCEPOPUP and appended HTML

GreGorGy

BULLSFAN
Joined
Jan 18, 2005
Messages
15,290
Reaction score
1,527
Location
Benoniebfkweesnie
So, here's my problem: I have inherited a Joomla site (I'd rather it wasn't but that's another issue not worth discussing). Where product pictures occur, the site uses jcepopup to create a modal zoom of the image:

Code:
<A HREF="zoom.jpg" CLASS="jcepopup"><IMG SRC="thumb.jpg"></A>

When this occurs in the natural body (from the Article Editor) it obviously works fine. Now, I want to put several images in a single-pane slide show and have the popup work. But it does not:

Code:
<SCRIPT TYPE="text/javascript" LANGUAGE=JAVASCRIPT CHARSET=UTF-8>
function linkchange()
	{
	document.getElementById("fxshow").innerHTML = '<A HREF="zoom2.jpg" CLASS="jcepopup"><IMG SRC="thumb2.jpg"></A>'
	}
</SCRIPT>
...
<SPAN ID="fxshow"><A HREF="zoom.jpg" CLASS="jcepopup"><IMG SRC="thumb.jpg"></A></SPAN><BR>
<A onClick="linkchange()">Next</A>

Ignoring style and all other variables, the above code works to replace the inner html in the span with everything as expected EXCEPT that jcepopup class. I can recode the whole damn thing for a different modal image but that would defeat the purpose of this piece of crap being in joomla.

Any ideas?
 
Mmm - worked around it with display="inline" and display="none" in the style elements and then having multiple instances. Still would prefer a scripted solution though...
 
Top
Sign up to the MyBroadband newsletter
X