Hi, i am a complete novice and have managed to use this code to load videos into a div on a page, make them invisable, and play each individual video on the player when clicked on via a picture link in the same page. It works fine, but now i need to change the code to do the same thing for showing just pictures
here's the code for the vids
<div id="selectqtvideo2" style="display: none">
<embed src="../media/Lake.mov" width="320" height="256"> </embed>
</div>
<div id="selectqtvideo3" style="display: none">
<embed src="../media/cam vid.mov" width="320" height="256"> </embed>
</div>
<div id='videoPlayback' style='width: 320px; height:256px; background-color: #2A0000;'></div>
<A HREF="../media/Lake.mov" onclick='return playVideo("selectqtvideo2","videoPlayback")'><img src="../raw images/vid 2.JPG" alt="vid 2" width="887" height="450" /></a>
<a href="../media/cam vid.mov" onclick='return playVideo("selectqtvideo3","videoPlayback")'><img src="../raw images/vid 3.JPG" alt="vid 3" width="781" height="456" /></a>
<script type="text/javascript">function playVideo(sourceId, targetId) { if (typeof(sourceId)=='string') {sourceId=document.getElementById(sourceId);} if (typeof(targetId)=='string') {targetId=document.getElementById(targetId);} targetId.innerHTML=sourceId.innerHTML; return false;}</script>
It is all done in a layout table and i have not included the table stuff for ease. Just the important bits.
obviously i have to change the div id, the links to photos, the embed sources and the image sources, but i think i need to change something else in the java script to get it to work. and i don't know the function for images (or anything else for that matter). Do i change function playVideo for function viewImg or something like that ? Please could somebody point me in the right direction.
Thanks for any of your input !
here's the code for the vids
<div id="selectqtvideo2" style="display: none">
<embed src="../media/Lake.mov" width="320" height="256"> </embed>
</div>
<div id="selectqtvideo3" style="display: none">
<embed src="../media/cam vid.mov" width="320" height="256"> </embed>
</div>
<div id='videoPlayback' style='width: 320px; height:256px; background-color: #2A0000;'></div>
<A HREF="../media/Lake.mov" onclick='return playVideo("selectqtvideo2","videoPlayback")'><img src="../raw images/vid 2.JPG" alt="vid 2" width="887" height="450" /></a>
<a href="../media/cam vid.mov" onclick='return playVideo("selectqtvideo3","videoPlayback")'><img src="../raw images/vid 3.JPG" alt="vid 3" width="781" height="456" /></a>
<script type="text/javascript">function playVideo(sourceId, targetId) { if (typeof(sourceId)=='string') {sourceId=document.getElementById(sourceId);} if (typeof(targetId)=='string') {targetId=document.getElementById(targetId);} targetId.innerHTML=sourceId.innerHTML; return false;}</script>
It is all done in a layout table and i have not included the table stuff for ease. Just the important bits.
obviously i have to change the div id, the links to photos, the embed sources and the image sources, but i think i need to change something else in the java script to get it to work. and i don't know the function for images (or anything else for that matter). Do i change function playVideo for function viewImg or something like that ? Please could somebody point me in the right direction.
Thanks for any of your input !