Have not a clue if this is what you want to accomplish, so this is just a SWAG!
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title> Untitled </title>
<script type="text/javascript">
function $_(IDS) { return document.getElementById(IDS); }
</script>
<style type="text/css">
#panelDisplay { height:100px; width:200px; background-Color:orange; border:1px solid black; }
</style>
</head>
<body>
<div id="panelDisplay"></div>
<input id="simSource" type="text" value=""> Simulated input message <br>
<button onclick="$_('simChange').value=$_('simSource').value; $_('simSource').value = '';">Send</button>
<input type="hidden" id="simChange" value=""> <!-- information obtained from AJAX source -->
<p>
<script type="text/javascript">
function checkAJAX() {
var tmp = $_('simChange').value;
if (tmp == '') { return; }
$_('panelDisplay').innerHTML += tmp+'<br>';
$_('simChange').value = '';
return;
}
var t = setInterval("checkAJAX()",5000);
</script>
</body>
</html>
It is a simulation only.
Your information would come from the 'simChange' element obtained via an AJAX call to your server.
Change the 'hidden' to 'text' to see how the server file would be changed in action.
The survey of the change event occurs every 5 seconds in this example.
Bookmarks