|
Dynamische Mind Map-Generierung mit PHP |
|
|
|
|
Seite 3 von 3
Und hier die zur Anzeige im Web benötigte HTML-Datei (modifiziert um ein Formular). Man beachte für die Variablenübergabe an die .mm-Atrappe besonders den unteren Bereich (fo.addVariable...).
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>MINDMAPS</title>
<script type="text/javascript" src="flashobject.js"></script>
<style type="text/css">
/* hide from ie on mac \*/
html {
height: 100%;
overflow: hidden;
}
#flashcontent {
height: 100%;
}
/* end hide */
body {
height: 100%;
margin: 0;
padding: 0;
background-color: #9999ff;
}
</style>
</head>
<body>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" methot="post">
Anzahl Knoten auf 1. Ebene: <input type="text" name="knoten1">
Anzahl Knoten auf 2. Ebene: <input type="text" name="knoten2">
<input type="submit">
</form>
<div id="flashcontent">
Flash plugin or Javascript are turned off.
Activate both and reload to view the mindmap
</div>
<script type="text/javascript">
// <![CDATA[
var fo = new FlashObject("visorFreemind.swf", "visorFreeMind", "100%", "100%", 6, "#9999ff");
fo.addParam("quality", "high");
fo.addParam("bgcolor", "#ffffff");
fo.addVariable("openUrl", "_blank");
fo.addVariable("initLoadFile", "freemind.php?knoten1=<? echo $knoten1 ?>&knoten2=<? echo $knoten2 ?>");
fo.addVariable("startCollapsedToLevel","5");
fo.addVariable("mainNodeShape","rectangle");
fo.write("flashcontent");
// ]]>
</script>
</body>
</html>
Relevante Beiträge (automatisch):
|