I've these codes in a simple project, I want to refresh the news ticker when the button is clicked. The src is changing, but it is not showing contents from the php file which is printing a simple javascript.
Here is th HTML
<marquee id="ticker"></marquee>
<button onclick="refresh()">Refresh</button>
Here's the JS
function refresh(){
document.getElementById('ticker').innerHTML = "<script src='ticker.php?" + new Date().getTime() + "'></script>";
}
Here's what inside ticker.php
<?php
echo "document.write('It is the scrolling news');";
?>