-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnew.php
More file actions
78 lines (72 loc) · 2.67 KB
/
new.php
File metadata and controls
78 lines (72 loc) · 2.67 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTPYE html>
<html>
<head>
<?php include_once("assets/head.php"); ?>
<title>Neuer Eintrag</title>
</head>
<body>
<?php include_once("assets/header.php"); ?>
<div class="container">
<form class="form-inline center_div" method="post" action="person.php" id="user-form">
<div class="form-group">
<label for="vorname">Vorname: </label>
<input type="text" class="form-control this-editable" id="vorname">
</div>
<br>
<div class="form-group">
<label for="nachname">Nachname: </label>
<input type="text" class="form-control this-editable" id="nachname">
</div>
<br>
<div class="form-group">
<label for="gdate">Geburtsdatum: </label>
<input type="date" class="form-control this-editable" id="gdate">
</div>
<br>
<div class="form-group">
<label for="adresse">Adresse: </label>
<input type="text" class="form-control this-editable" id="adresse">
</div>
<br>
<div class="form-group">
<label for="ort">Wohnort: </label>
<input type="text" class="form-control this-editable" id="ort" onchange="plz_change(this.value)">
<input type="text" class="form-control" id="ortname" readonly>
</div>
<br>
<br>
</form>
<button id="del-btn" onclick="del_click()" class="btn btn-danger">Löschen</button>
<button id="update-btn" onclick="update_click()" class="btn btn-info">Ändern</button>
<button id="update-save-btn" onclick="save_click()" class="btn btn-info btn-invis">Speichern</button>
<button id="new-btn" onclick="new_click()" class="btn btn-success">Neu</button>
<br><br><br>
<script>
function test(e){
e.preventDefault();
$("#form").submit();
}
function plz_change(plz) {
var xmlhttp;
while (plz.length == 5){
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
$("#ortname").value = this.responseText;
}
};
xmlhttp.open("GET","php/getort.php?plz="+plz,true);
xmlhttp.send();
}
}
</script>
</div>
<?php include_once("assets/foot.php"); ?>
</body>
</html>