Hi guys! I need to add another "method" (#21) to my code to allow for an external link to open in full screen. I have created the necessary javascript for this. However, I keep breaking the PHP when attempting to adjust the syntax. Below is the code for the function:
/* ----- Function createLink -----
Creates the links for the Courses and Downloads.
The different methods require different destinations
------------------------------- */
function createLink ($method, $capfilename, $text) {
if ($method == 1) {
echo '<li><a href="javascript:launchwin(\'viewer.php?capfilename='.$capfilename.'\', \'newwindow\',\'width=\'+(screen.width - 10)+\',height=\'+(screen.height - 30)+\',screenX=0,screenY=0,directories=0,fullscreen=1,location=0,menubar=0,scrollbars=0,status=0,toolbar=0\')">'.trim($text).'</a> ';
echo '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" id="detection" width="10" height="10" align="middle">';
echo '<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="detection.swf" /><param name="quality" value="high" /><param NAME="wmode" VALUE="transparent"><param name="bgcolor" value="#ffffff" />';
echo '<embed src="detection.swf" quality="high" bgcolor="#ffffff" width="10" height="10" swLiveConnect=true id="detection" name="detection" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
echo '</li>';
} elseif ($method == 19) {
echo '<li><a href="javascript:launchwin(\'viewer1000.php?capfilename='.$capfilename.'\', \'newwindow\',\'width=\'+(screen.width - 10)+\',height=\'+(screen.height - 30)+\',screenX=0,screenY=0,directories=0,fullscreen=1,location=0,menubar=0,scrollbars=0,status=0,toolbar=0\')">'.trim($text).'</a> ';
echo '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" id="detection" width="10" height="10" align="middle">';
echo '<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="detection.swf" /><param name="quality" value="high" /><param NAME="wmode" VALUE="transparent"><param name="bgcolor" value="#ffffff" />';
echo '<embed src="detection.swf" quality="high" bgcolor="#ffffff" width="10" height="10" swLiveConnect=true id="detection" name="detection" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
echo '</li>';
} else {
echo '<li><a href="docs/'.$capfilename.'" target="_blank">'.trim($text).'</a></li>';
}
}
/* ----- end Function createLink ----- */
The javascript link that I will need that "delivery method" to display is:
"javascript:void(0);" onClick="fullScreen('http://url.com");"
I could really really use some help with this, as I have a deadline of today.
Thanks so much in advance!