summaryrefslogtreecommitdiffstats
path: root/Lasers_und_stuff/templates/status.html
blob: 233476b9b46217ae55122df59fab7af2b8ede3ca (plain)
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
30
31
32
33
34
{% extends "layout.html" %}
{% block body %}
<script type=text/javascript src="{{url_for('static', filename='jquery.min.js') }}"> </script>
<script type=text/javascript>
	$(document).ready(function(){
	//
	$('#dupa').text("I like bananas");
	});
	
	function pop_banana() {
		$('#banana').html('<a href="http://ranchochilamate.com/wp/wp-content/uploads/2010/10/banana.jpg">Click</a>');
	}
	
		$.post("/right/20", function(data) {
  			$('#dupa').html(data);
		});
	
	function move_up() {
		$.post("{{url_for('move_up', amount="20")}}", function(data) {
  			$('#dupa').html(data);
		});
	}
</script>
  	<div style="width: 400px; height: 400px; margin-top: -200px; margin-left: -200px; position: absolute; top: 50%; left: 50%;">
            <a  onclick="move_up()">Up</a>
            <a href="/down/20">Down</a>
            <a href="/left/20">Left</a>
            <a href ="/right/20"" onclick="move_right()">Right</a>
            <p id="dupa" onclick="move_right()"></p>
            <p id="banana"></p>
            <h2>Status</h2> <p>{{data}}</p></div>
    </body>
    
{% endblock %}