File: i2geo.html

package info (click to toggle)
jsxgraph 1.10.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 24,804 kB
  • sloc: javascript: 82,299; xml: 5,869; java: 1,072; php: 281; makefile: 184; python: 174; cpp: 76; sh: 12
file content (29 lines) | stat: -rw-r--r-- 1,134 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<html>
<head>
  <title>JSXGraph example</title>
  <link rel="stylesheet" type="text/css" href="/jsxgraph/distrib/jsxgraph.css" />
  <script type="text/javascript" src="/javascript/prototype/prototype.js"></script>
  <script type="text/javascript" src="../src/jsxgraphcore.js"></script>
  <script type="text/javascript" src="/jsxgraph/distrib/IntergeoReader.js"></script>
</head>
<body id="body">
<div id="box" class='jxgbox' style="width:600px; height:400px;"></div>
<form>
	<input type="text" id="filein" value="file.i2g" />
    <p>
    <input type='button' value='Read file' onclick="loadFile($('filein').value,'intergeo')" />
</form>
<div id="debug" style="display:block;"></div>
<script type="text/javascript">
  var board;
  function loadFile(bspname, format) {
    document.getElementById('box').innerHTML = '';
    var value = $('filein').value;
    document.getElementById('debug').innerHTML = "<b>Debug (lade "+ value +" ...):</b>";

    if(typeof board != 'undefined') JXG.JSXGraph.freeBoard(board);
    board = JXG.JSXGraph.loadBoardFromFile('box',value, format);
  }
</script>
</body>
</html>