0 Replies Latest reply on Sep 26, 2006 9:50 PM by Paul Pantages

    Seam Remoting & Javascript

    Paul Pantages Novice

      Hello Seamers, I have another question.

      I have been having some problems with seam remoting and I wanted to back off and
      try a simple test to start.

      I have run the example progress bar application on my server and it works as

      I wanted to then see if I could run a simple poller, so I started
      out with the progress bar javascript...

      I removed the remote call, & var declaration and the src statement for
      seam/remoting/interface.js?progressBarAction, resulting in the code
      below. I have defined a button to start it off.

      I am just trying to see if the getProgress() function will run after
      the 1000 timeout & then reschedule itself.

      But... I only see first alert "Query Progress" but that is it. The
      getProgress() function is never run, not even once. Somehow the timeout is being cancelled? I get no msgs in the javascript console.

      Thank you, in advance, for any ideas... PdP

       <script type="text/javascript" src="/client/seam/remoting/resource/remote.js">
       // This space intentionally left blank
       <script type="text/javascript">
       // don't display the loading indicator
       Seam.Remoting.displayLoadingMessage = function() {};
       Seam.Remoting.hideLoadingMessage = function() {};
       // var progressBarAction = Seam.Component.getInstance("progressBarAction");
       function queryProgress() {
       alert("Query Progress");
       setTimeout("getProgress()", 1000);
       function getProgress() {
       alert("Get Progress");
       //function progressCallback(progress) {
       //if (progress.percentComplete < 100)
       // ]]>