Aarclay schreef:Thanks! En ik wil ook nog een interval zetten zodat als er in de input iets word getypt dat er niet gelijk een reload word gedaan, maar na 1 seconden.[COLOR= #0000BB]<?php $datetime[/COLOR] [COLOR= #007700]=[/COLOR] DateTime[COLOR= #007700]::[/COLOR]createFromFormat[COLOR= #007700]([/COLOR][COLOR= #DD0000]Y-m-d*H:i:sT[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]2013-09-15T00:30[/COLOR][COLOR= #007700]);[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$datetime[/COLOR][COLOR= #007700]->[/COLOR]format[COLOR= #007700]([/COLOR][COLOR= #DD0000]Y-m-d H:i:s[/COLOR][COLOR= #007700]);[/COLOR] ?>
Codeblok (voorbeeld.php):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function update() {
var url = document.getElementById(change_frame);
var station = setInterval(document.getElementById(station_input), 1000);
var data = station.value;
if(data.trim() == ) {
} else {
url.src = http://localhost/data.php?s= + data;
}
}
function openwindow() {
var station = document.getElementById(station_input);
var data = station.value;
if(data.trim() == ) {
alert(U heeft geen trein station in het witte vlak getypt!);
} else {
document.getElementById(light).style.display=block;
document.getElementById(fade).style.display=block;
}
}
Ik heb nu dat alleen word die nu nooit geupdated?

, hoe los ik et op..