The goal is to refresh a web page when a jms message is received or
the Apache DB database is changed.
How to do that with javascript?
Is there any sample code?

I tried the following as the first step.
I click the "connectToServer" button but no "connectToServer" alert
box appear.
The web page is:
      <input type="button" id="btnSubmit"  onclick="connectToServer()"
value="connectToServer" name="btnSubmit">

     <script type="text/javaScript" src="js/RefreshWebpage.js"></

RefreshWebpage.js is:
Event.observe(window, 'load', function() {
        alert("observe"); // for debugging
        Event.observe( 'btnSubmit', 'click', Refresh);

function connectToServer()
        alert("connectToServer"); // for debugging
        new Ajax.Request('/', {
            onComplete: function(transport) {
            if (200 == transport.status)


function Refresh()
alert("Refresh"); // for debugging

You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to