Ok i've built up a gallery for a client and i ahd each thumnail loading up ina seperate window. But he decided he wanted javascript windows.
Now then I'm a javascript N00b and dont really want tpo get into it but do need some help with this.
and i am trying to set a link of each picture file to load its picture/captiona dn title in this javascript widnow.Code:<SCRIPT LANGUAGE="JavaScript"> function show_photo(pFileName,pTitle,pCaption) { photoWin = window.open( "", "Cerys Gallery", "width=600,height=450, status,scrollbars,resizable,screenX=20,screenY=40,left=20,top=40"); photoWin.document.write('<html><head><title>' + pTitle + '</title></head>'); photoWin.document.write('<BODY BGCOLOR=#000000 TEXT=#FFFFCC LINK=#33CCFF VLINK=#FF6666>'); photoWin.document.write('<center>'); photoWin.document.write('<font size=+3 face="arial,helvetica"><b>' + pCaption + '</b></font><br>'); photoWin.document.write('<img src="' + pFileName + '"><p>'); photoWin.document.write('<font face="arial,helvetica">'); photoWin.document.write('"' + pTitle + '"<br>'); photoWin.document.write('<p></font></body></html>'); photoWin.document.close(); if (navigator.appName.substring(0,8) == "Netscape") photoWin.focus(); } </SCRIPT>
As we can see i'm mixing Php/Html/JavascriptPHP Code:echo "<a href='javascript:show_photo(" . $path . "," . $title . "," $caption ")>";
echo "<img src='" . $path . "' width='100'></a></td>";
This does nothingcan anyone explain to me how to use the function above corrrctly?





can anyone explain to me how to use the function above corrrctly?
Reply With Quote