Note that there are some explanatory texts on larger screens.

plurals
  1. POdojo Standby widget not spinning
    primarykey
    data
    text
    <p>Using dojo 1.8.1...Using the Standby Widget to show processing while the server is busy doing it's thing with an AJAX request.</p> <p>I've created a dojox.widget.Standby object problematically and it works perfectly the first time I .show() or .hide() it. The second time I try to .show() it, it appears but the spinner is not spinning..Animated .gif trouble??</p> <p>How can I keep the spinner spinning when a button is clicked for a second or more times??</p> <p>UPDATE....</p> <p>What my app is doing is displaying data in a dojo DataGrid object for the user to select. The selection are xmit'd to the server with an AJAX request and the server returns a file name that the user can download or open (.csv file). I use the following javascript to create the open/save dialog on the client side:</p> <pre><code> window.location.assign(path); //Open save/open dialog </code></pre> <p>If I comment out this line, then the spinner works on every click of the button.</p> <p>2nd UPDATE....</p> <p>Added hidden iframe HTML:</p> <pre><code> &lt;iframe src="" style="display: none;" id="ifr"&gt;&lt;/iframe&gt; </code></pre> <p>When I received the path to the downloadable file from the server I use this to pop the dialog box and download:</p> <pre><code> window.document.getElementById("ifr").src=path; //Where path is location of downloadable file </code></pre> <p>Now, everything looks smooth for the downloadable file dialog and more clicks on the button keep the spinner spinning...</p> <p>Thanks @Frode for providing the answer to this problem...</p> <pre><code>require(["dojox/widget/Standby", "dojo/domReady!"], function(Standby) { var standby = new Standby({ id: "standbyObj", target: "standby", color: "transparent", zindex: "auto", duration: "1000" }); window.document.body.appendChild(standby.domNode); standby.startup(); }); </code></pre> <p>Later when a button is clicked:</p> <pre><code>var standObj = dijit.byId("standbyObj"); if (standObj) { standObj.show(); } </code></pre> <p>...Server Processing AJAX request....</p> <p>After processing completes:</p> <pre><code>var standObj = dijit.byId("standbyObj"); if (standObj) { standObj.hide(); } </code></pre> <p>This all works great but if the button is clicked again the spinner shows but is not spinning.</p> <p>Other stuff:</p> <p>css:</p> <pre><code> #standby { position: absolute; top: 50%; left:50%; width:32px; height:32px; margin-top: -16px; margin-left: -16px; } </code></pre> <p>html:</p> <pre><code>&lt;div id="standby"&gt;&lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload