-
Notifications
You must be signed in to change notification settings - Fork 1
/
template4.3
93 lines (93 loc) · 3.62 KB
/
template4.3
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<form action="ideal.php" method="post">
<!--http://demosthenes.info/blog/757/Playing-With-The-HTML5-range-Slider-Input !-->
<script>
function popoutputUpdate(number)
{
document.querySelector('.popnumber').value = number;
}
function areaoutputUpdate(number)
{
document.querySelector('.areanumber').value = number;
}
function tempoutputUpdate(number)
{
document.querySelector('.tempnumber').value = number;
}
function incomeoutputUpdate(number)
{
document.querySelector('.incomenumber').value = number;
}
function coastoutputUpdate(number)
{
document.querySelector('.coastnumber').value = number;
}
</script>
<fieldset>
<div>
<?php
$apopulation = 6265634;
$aarea = 75885;
$atemp = 51.9;
$aincome = 50473;
$acoast = 251.5;
?>
<div>
Ideal Population:
</br>
<input value=0 name="xpopulation" placeholder="Average: <?php echo($apopulation); ?>" type="text"/>
</div>
</br>
How important is this factor to you?
<input type=range name="ipopulation" value=5 min=0 max=10 id=popfader step=1 onchange="popoutputUpdate(this.value)">
<output for=popfader class=popnumber>5</output>
</br>
</br>
<div>
Ideal Area (square miles):
</br>
<input value=0 name="xarea" placeholder="Average: <?php echo($aarea); ?>" type="text"/>
</div>
</br>
How important is this factor to you?
<input type=range name="iarea" value=5 min=0 max=10 id=areafader step=1 onchange="areaoutputUpdate(this.value)">
<output for=areafader class=areanumber>5</output>
</br>
</br>
<div>
Ideal Average Temperature (©F):
</br>
<input value=0 name="xtemp" placeholder="Average: <?php echo($atemp); ?>" type="text"/>
</div>
</br>
How important is this factor to you?
<input type=range name="itemp" value=5 min=0 max=10 id=tempfader step=1 onchange="tempoutputUpdate(this.value)">
<output for=tempfader class=tempnumber>5</output>
</br>
</br>
<div>
Ideal Median Household Income:
</br>
<input value=0 name="xincome" placeholder="Average: <?php echo($aincome); ?>" type="text"/>
</div>
</br>
How important is this factor to you?
<input type=range name="iincome" value=5 min=0 max=10 id=incomefader step=1 onchange="incomeoutputUpdate(this.value)">
<output for=incomefader class=incomenumber>5</output>
</br>
</br>
<div>
Ideal Coastline (miles):
</br>
<input value=0 name="xcoast" placeholder="Average: <?php echo($acoast); ?>" type="text"/>
</div>
</br>
How important is this factor to you?
<input type=range name="icoast" value=5 min=0 max=10 id=coastfader step=1 onchange="coastoutputUpdate(this.value)">
<output for=coastfader class=coastnumber>5</output>
</div>
</br>
<div>
<button type="submit">Go!</button>
</div>
</fieldset>
</form>