<script>
var source = new EventSource("panic.php");
source.onmessage=function(event) {
document.getElementById("panic_status").innerHTML=event.data;
};
</script>
how do i set the element panic status into are variable in another script for example
var name = document.getElementById("panic_status").value;
panic_status
if will show up the value coming from the panic_status bur i need to set up this in another script as variable so that i can manipulated the value – RUHAIZAN FAZREEN ASHRAFF MOHD Mar 24 '18 at 22:18