Input checken op ingevuld
Hoe krijg ik het voor elkaar dat die de kopjes, BOUW, BNR en ACCEPTEER check op ingevuld?
Code (php)
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
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
<html>
<head>
<style>
.halfsize {
-moz-transform:scale(0.5);
-webkit-transform:scale(0.5);
transform:scale(0.5);
}
</style>
<script language="Javascript" >
function FillBilling(f) {
if(f.billingtoo.checked == true) {
f.bouw2.value = f.bouw.value;
f.bnr2.value = f.bnr.value;
}
}
function download(filename, text) {
var filename = "bestandsnaam.xml"
var pom = document.createElement('a');
pom.setAttribute('href', 'data:text/plain;charset=utf-8,' +
encodeURIComponent(text));
pom.setAttribute('download', filename);
pom.style.display = 'none';
document.body.appendChild(pom);
pom.click();
document.body.removeChild(pom);
}
</script>
</head><center>
<body bgcolor="#1C5D87">
<font face="verdana" color="white">
<img src="logo.gif" border="0" title="" class="halfsize">
<form onsubmit="download(this['name'].value, this['bouw'].value+' \n'+this['bnr'].value+' '+this['naam'].value+' \n'+this['bnr2'].value);">
BOUW:<br>
<input type="text" name="bouw" size="20"><br><br>
BNR:<br>
<input type="text" name="bnr" size="20"><br><br>
ACCEPTEREN:<br>
<input type="checkbox" name="billingtoo" onclick="FillBilling(this.form)">
<input type="hidden" name="bouw2">
<input type="hidden" name="bnr2">
<input name="naam" value="test verborgen" type="hidden">
<br> <input type="submit" value="Opslaan">
</form>
</body>
</html>
<head>
<style>
.halfsize {
-moz-transform:scale(0.5);
-webkit-transform:scale(0.5);
transform:scale(0.5);
}
</style>
<script language="Javascript" >
function FillBilling(f) {
if(f.billingtoo.checked == true) {
f.bouw2.value = f.bouw.value;
f.bnr2.value = f.bnr.value;
}
}
function download(filename, text) {
var filename = "bestandsnaam.xml"
var pom = document.createElement('a');
pom.setAttribute('href', 'data:text/plain;charset=utf-8,' +
encodeURIComponent(text));
pom.setAttribute('download', filename);
pom.style.display = 'none';
document.body.appendChild(pom);
pom.click();
document.body.removeChild(pom);
}
</script>
</head><center>
<body bgcolor="#1C5D87">
<font face="verdana" color="white">
<img src="logo.gif" border="0" title="" class="halfsize">
<form onsubmit="download(this['name'].value, this['bouw'].value+' \n'+this['bnr'].value+' '+this['naam'].value+' \n'+this['bnr2'].value);">
BOUW:<br>
<input type="text" name="bouw" size="20"><br><br>
BNR:<br>
<input type="text" name="bnr" size="20"><br><br>
ACCEPTEREN:<br>
<input type="checkbox" name="billingtoo" onclick="FillBilling(this.form)">
<input type="hidden" name="bouw2">
<input type="hidden" name="bnr2">
<input name="naam" value="test verborgen" type="hidden">
<br> <input type="submit" value="Opslaan">
</form>
</body>
</html>
https://www.phphulp.nl/php/forum/topic/input-field-toevoegen-aan-script/102008/last/
Dat voorkomt gespreide discussies.
Deze doe ik maar dicht.