File: i2geo.html

package info (click to toggle)
jsxgraph 1.3.5+dfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 26,044 kB
  • sloc: xml: 5,869; java: 1,072; python: 747; php: 192; makefile: 146; sh: 47
file content (29 lines) | stat: -rw-r--r-- 1,134 bytes parent folder | download | duplicates (2)
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>