All,
I'm trying to call in my first dyanmic JavaScript function OpenDynamicPic the BreedVideoOpen(videopath) function so that the dynakic image appears on the left and a video appear on the right - however I seem to be getting the BreedVideoOpen functions output keeps appearing in the top left of my webpage - therefore what needs to be done so this function can be called inside the first function so that the image appears n the right and the video on the left:
function OpenDynanamicPic(filedesc,filepath) {
var winContent = "<B style='font-size:18px;font-family:Verdana,sans-serif;line-height:1.5'>" + filedesc + "</B>";
winContent += "<CENTER>";
winContent += "<table border='0'><tr><td colspan='2'>";
winContent += "<img src='dynamic_imgs/" + filepath + "' name='" + filepath + "'><br>";
winContent += "</td>";
winContent += "<td>";
BreedVideoOpen(videopath);
winContent += "</td>";
winContent += "</tr></table>";
winContent += "<a href='/shoppingCart/addToCart.cgi?item=pc&design=" + filepath + "&description=" + filepath + "&quantity=1&price=40'><img src='/images/buy.gif' border='0'></a><br><br>";
winContent += "<a href='product1.htm' style='text-decoration : none;'><b>Product 1</b></a> <a href='product2.htm' style='text-decoration : none;'><b>Product 2</b></a> <a href='products.htm' style='text-decoration : none;'><b>Products Full</b></a> <a href='link1.htm' style='text-decoration : none;'><b>Link 1</b></a> <a href='index.htm' style='text-decoration : none;'><b>HOME</b></a> "
winContent += "</CENTER>";
document.write(winContent);
}
function BreedVideoOpen(videopath) {
var winContent = "";
if(videopath && videopath.length>0) {
winContent +="<p><a href='#' id='dialog_link' class='ui-state-default ui-corner-all'><span class='ui-icon ui-icon-newwin'></span>Video Sample</a></p>"
winContent +="<div id='dialog' title='Video Sample'>"
winContent +="<p align='center'><OBJECT classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width='190' height='480' codebase='http://www.apple.com/qtactivex/qtplugin.cab'>"
winContent +="<param name='src' value='" + videopath + "'>"
winContent +="<param name='autoplay' value='true'>"
winContent +="<param name='controller' value='true'>"
winContent +="<param name='loop' value='true'>"
winContent +="<EMBED src='+ videopath +' autoplay='true' controller='true' loop='true' width='190' height='480' pluginspage='http://www.apple.com/quicktime/download/'>"
winContent +="</EMBED>"
winContent +="</OBJECT></p>"
winContent +="</div>"
document.write(winContent);
}
}