please help.
I\'m using Server Sent Events to dynamically update a website based on data stored in a database.
I now wish to pass a new parameter (\'abc.php/
Ok spent some time pretty much getting better grip on Javascript.
var source = new EventSource("xyz.php?last=0");
source.addEventListener('message', onMessageHandler,false);
function onMessageHandler(event) {
console.log(event.data);//just for debug purposes
event.target.close(); //close current stream.
var last = "1234"; // loaded from event.data in my solution.
var sourceNew = new EventSource("xyz.php?last=" + last); // start another
sourceNew.addEventListener('message', onMessageHandler, false); //event
}
and i seem to have solved the problem i had.
Ta