Expand|Select|Wrap|Line Numbers
- function showPic (whichpic)
- {
- if (document.getElementById)
- {
- document.getElementById('placeholder').src = whichpic.href;
- }
- return false;
- }
Expand|Select|Wrap|Line Numbers
- function showFlash (whichFlash)
- {
- if(getElementByID)
- {
- document.getElementByID('placeholder').data = whichFlash.href;
- document.getElementById('swfsrc').setAttribute('movie', whichFlash.href);
- }
- return false;
- }
Expand|Select|Wrap|Line Numbers
- <object
- id="placeholder"
- type="application/x-shockwave-flash"
- data="../media/dresscat.swf"
- width="700" height="300">
- <param name="movie" value="../media/dresscat.swf" id="swfsrc" />
- </object>
Expand|Select|Wrap|Line Numbers
- <a onclick="return showFlash(this)" href="../media/mia_flash_gallery.swf">image</a>
When the thumbnail is clicked, the SWF with the ID 'placeholder' should be replaced with the SWF referenced in the thumbnail link, so the old SWF file is "swapped" for the new one.
What actually happens:
When the thumbnail is clicked, a page containing only the SWF is loaded in full frame.
Here's an example of the working image gallery on my site.
Thanks in advance.