Christoph: PHP Include-anweisung innerhalb von javascript

Beitrag lesen

Hallo zusammen mein erstes Problem habe ich selber gelöst bekommen
 (Frameset auf Vollbild und wieder zurück ins Frameset ...). Nun habe ich ein neues Problem.
Ich möchte, dass mein Script eine "PHP Include-anweisung" ausführt.
Die Stelle wo der Code hin soll ist mit "HIER SOLL DER PHP CODE HIN" gekennzeichnet

das ist der PHP Schnipsel ...
<? $include_file = DIR_WS_INCLUDES . 'navibar.php';  include(DIR_WS_INCLUDES . 'include_once.php'); ?>

Bitte helft mir ... ich weis nicht mehr weiter. Oder kann man vielleicht alles in javascript umwandeln, oder so ??
Den Code in javascript variable umwandeln und und dann schreiben lassen funktioniert nicht ... hm, please help me ;-)

Hier das Script ....

<SCRIPT LANGUAGE="JavaScript">
<!--

if(top.location.href != self.location.href)
document.writeln('<table width="100%" border="0" align="center">' + '<tr>' + '<td align="center">' + '<A

HREF="'+self.location.href+'" TARGET="_top">Vollbild</A>' + '</td>' + '<td align="center">'HIER SOLL DER PHP CODE HIN +

'</td>' + '</tr>' + '</table>');
else
document.writeln('<table width="100%" border="0" align="center">' + '<tr>' + '<td align="center">' + '<A

HREF="'+top.location.href+'"onClick="Framing()">Frameset</A>' + '</td>' + '<td align="center">'HIER SOLL DER PHP CODE HIN +

'</td>' + '</tr>' + '</table>');

function Framing()
{
if (this.document == top.document || top.location.host == this.location.host) {
var protocol = location.protocol + '//' + location.host + location.pathname.substring(0,

location.pathname.lastIndexOf('/catalog') + 1);
var path = location.pathname;
var rest = location.search;
var doctitle = document.title;
document.clear();
document.open("text/html");
document.writeln('<html>\n<head><title>'+doctitle+
'</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>');
document.writeln('<frameset rows="72,*" cols="*" framespacing="0" frameborder="NO" border="0">'+
'<frame src="top.php" name="topFrame" scrolling="NO" noresize>'+
'<frameset rows="*,52" frameborder="NO" border="0" framespacing="0">'+
'<frame src="'+ protocol + path + rest +' " name=mainFrame >'+
'<frame src="bottom.php" name="bottomFrame" scrolling="NO" noresize>'+
'</frameset>'+
'</frameset></html>');
document.close();
return true;
}
return false;
}

// --->
</script>