add src attribute to popup_init

This commit is contained in:
mohrt
2002-02-18 15:22:28 +00:00
parent 60617aa799
commit 7790cc88a7
4 changed files with 20 additions and 7 deletions

View File

@@ -12,9 +12,15 @@ function smarty_function_popup_init($args, &$smarty_obj)
{
// be sure to place overlib.js where Smarty can locate it.
// overlib.js came with the distribution of Smarty.
echo '<DIV ID="overDiv" STYLE="position:absolute; visibility:hidden; z-index:1000;"></DIV>'."\n".'<SCRIPT LANGUAGE=javascript>'."\n".'<!--'."\n";
readfile(SMARTY_DIR."overlib.js",1);
echo '// -->'."\n".'</SCRIPT>'."\n";
extract($args);
echo '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>'."\n";
if (empty($src)) {
echo '<script language="JavaScript">'."\n".'<!--'."\n";
readfile(SMARTY_DIR."overlib.js",1);
echo '// -->'."\n".'</script>'."\n";
} else {
echo '<script language="JavaScript" src="'.$src.'"></script>'."\n";
}
return;
}