jan
|
| Posted: 07/09/2001, 5:42 AM |
|
Hi!
I have the following problem:
I want to include extern javascripts in the templates, which are parsed by
php4, but the .js files seem not to be included.
I testet the .js file with a normal html-file and also wrote the js-code
directly into the template, both worked fine, therefore the javascript can
not the be the problem. The path is set also correct ( I am including css
files from the same directory and it works fine).
Up to now I only found a workaround by parsing the javascript into the
template, which is not the way I want to do it.
Thanks,
jan
For those who are interested in the workaround:
$str = <<<EOD
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(scre
en.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((scre
en.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosi
tion=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") ||
pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+'
,scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolb
ar=no,resizable=no';
win=window.open(mypage,myname,settings);}
EOD;
$tpl->set_var("skripts", $str);
|
|
|
 |
|