Spry:state="loading" for Spry.Utils.updateContent

It would be very handy to be able to use something like
spry:state="loading" for Spry.Utils.updateContent. Right now it
seems you can only use the :state="loading" for regions. Makes
sense but being able to activate the loading div while update
content is running would also be very handy. To that matter for
waiting for tabs to load, etc.

Cool. Thanks for the reference, Andrew!

Similar Messages

  • Using spry:state="loading" only after a certain interval

    Hi everyone ,
        I need a feature for spry regions. I want my loading spry state to show only loading of data takes 0.5 seconds and more.
    Is it possible with this version of spry?
    Ps1 : you can find a live example of my need in google webmaster tools' content section,content by title page. There is an ajax listview with paging on page and loading div only apeears if loading of data takes more than a certain milliseconds.
    Ps2 : Spry rulezzzz

    vw2ureg wrote:
    Hi,
    Go here and scroll down to ErrorState, LoadingState and ReadyState.
    I hope this helps.
    Ben
    That will only tell Spry that it should should use different "state" as loading state. But it doesn't display a loading state after a certain interval. This functionality does not exist in the Spry library. But you could create a custom "loading" state that you automatically trigger using setTimeout if your haven't gotten a onPostUpdate through your region observer.
    But i'm curious why you would wanna do create a have the loading state after a certain interval.

  • I have airport extreme and have windows 2003 what program do i down load for airport utility

    can any one help i tried one but was for windows 2007 no good need it for windows 2003 i have airport extreme just bought it today

    Ok thanks for the info - I am only familiar with Windows so I am going to suggest a typical setup using your Toshiba laptop - you can then use the network with any device - tell me if this works for you.
    Determine which version of Windows that your Toshiba uses.
    Go to http://support.apple.com/downloads/#peripherals
    You will be downloading Airport Utility
    Download version 5.6.1 for Windows 7 or
    Download version 5.5.3 for Windows XP or Vista
    Once you have done this let me know if you will be using this Extreme as your primary router after your modem or is your modem also acting as a router or do you have another router anywhere in your network

  • Spry:state="error" field is always visible?!

    I define layers to display the current spry:state, one for
    spry:state="loading", the second for spry:state="error" and the
    third for spry:state="ready". The problem is that
    spry:state="error" field is always visible along with
    spry:state="loading"?! Am I making some mistake or what? Here is a
    part of relevant code:
    <div id="vijesti" spry:region="pvVijestiMini"
    class="vijestimini">
    <div id="ucitavanjemini" spry:state="loading"
    class="indikator">
    <p>
    <span><img
    src="slike/pomocne/loader.gif"></span>
    <span>Podaci se učitavaju...</span>
    </p>
    </div>
    <div id="greskamini" spry:state="error"
    class="indikator">
    <p>
    <span><img
    src="slike/pomocne/loader2.gif"></span>
    <span>Podaci ne postoje ili su
    nedostupni...</span>
    </p>
    </div>
    <div id="podaci" spry:state="ready">
    <span class="vijestnaslov">Čikom vijesti
    [{ds_UnfilteredRowCount}]</span>
    <div id="redovimini" class="redovimini">
    <div class="red" spry:repeat="pvVijestiMini">
    <p class="podnaslov">
    <span>{datum}</span><br>
    <span class="naziv">{naziv}</span>
    </p>
    <p>
    <span>{ukratko}<a
    href="index.php?jezik=0&meni1=3&meni2=0&meni3=0"><img
    src="slike/pomocne/dalje.gif"
    class="dalje"></a></span>
    </p>
    </div>
    </div>
    <div id="navigacija">
    <div spry:if="{ds_UnfilteredRowCount} == 0">Nema
    podataka u tabeli "Vijesti"!</div>
    <div spry:if="{ds_UnfilteredRowCount} &gt; 0">
    <div><a href="#"
    onclick="pvVijestiMini.firstPage(); return
    false;">|&lt;</a><span> </span></div>
    <div><a href="#"
    onclick="pvVijestiMini.previousPage(); return
    false;">&lt;&lt;</a></div>
    <div> stranica {ds_PageNumber} od
    {ds_PageCount} </div>
    <div><a href="#" onclick="pvVijestiMini.nextPage();
    return
    false;">&gt;&gt;</a><span> </span></div>
    <div><a href="#" onclick="pvVijestiMini.lastPage();
    return false;">&gt;|</a></div>
    </div>
    </div>
    </div>
    </div>
    The second question: How do I hide region container until it
    gets filled with data?

    Look, you got me all wrong. I don't want to hide a main
    region, just the spry:state="error" appearing the same time as
    spry:state="loading"!!!
    <div id="ucitavanjemini" spry:state="loading"
    class="indikator">
    <p>
    <span><img
    src="slike/pomocne/loader.gif"></span>
    <span>Podaci se učitavaju...</span>
    </p>
    </div>
    <div id="greskamini" spry:state="error"
    class="indikator">
    <p>
    <span><img
    src="slike/pomocne/loader2.gif"></span>
    <span>Podaci ne postoje ili su
    nedostupni...</span>
    </p>
    </div>

  • Spry:state not working properly

    Hi,
    I have the following code wrapped around my page:
    <div spry:state="loading"
    class="AjaxLoadingLarge">Loading...</div>
    <div spry:state="error">Sorry! An Error has
    occurred!</div>
    <div spry:state="ready">
    PAGE CODE HERE
    </div>
    Whilst the page is loading, the Loading State Appears on the
    screen normally but also has the Error State Content and the Ready
    State Content (unpopulated with Data) - ie it's the table with all
    the header row and 1 results row displaying the dataset field names
    {EventID} {EventDesc} etc.
    Once the page is loaded, everything displays perfectly, It
    just looks as though the "state" is not being handled properly
    until the state becomes ready.
    Anyone else seen this problem? and any ideas?
    Dom

    Hi - Thanks for the response.
    The previous line of code now reads:
    <div spry:region="ds1" class="SpryHiddenRegion">
    and I have closed the DIV off but it has made no difference
    whatsoever - but there is no class in any .css for this.
    Having Googled this, I found that some people have a class in
    the .css as display:none. I added this and nothing is then visible.
    Any further ideas?
    Dom

  • Spry:State and PagedView

    Dear Member,
    hope that somebody can help me this time..
    I am using spry, and a lot of trick to make it work.
    The spry:state="loading" options don't wanna work for me
    it's only work if i don't use the PagedView...
    Here the simple code
    I have a simple XMLdataset:
    var dsmio = new Spry.Data.XMLDataSet("Xml/filexxx.asp", "Clienti/Cliente", {sortOnLoad: "RagioneSociale", sortOrderOnLoad: "ascending", useCache: false});
    and a pagination on it:
    var paginazione = new Spry.Data.PagedView( dsmio ,{ pageSize: 50 });
    finally the code to show my data:
    <div spry:region="paginazione">
    <div spry:state="loading">Loading Data - Please stand by...</div>
    <div spry:state="error">OPS, something went wrong!</div>
    <div spry:state="ready">
      <table width="100%">
        <tr>
          <th width="25%" height="20" align="left" bgcolor="#CCCCCC" spry:sort="RagioneSociale">RagioneSociale</th>
          <th width="25%" height="20" align="left" bgcolor="#CCCCCC" spry:sort="Email">Email</th>
          <th width="25%" height="20" align="left" bgcolor="#CCCCCC" spry:sort="Telefono">Telefono</th>
          <th width="25%" height="20" align="left" bgcolor="#CCCCCC" spry:sort="PersonaRiferimento">PersonaRiferimento</th>
        </tr>
        <tr spry:repeat="paginazione" class="{ds_EvenOddRow}">
         <td width="25%" height="20">{RagioneSociale}</td>
          <td width="25%" height="20">{Email}</td>
          <td width="25%" height="20">{Telefono}</td>
          <td width="25%" height="20">{PersonaRiferimento}</td>
        </tr>
      </table>
    </div>
    Hope some Guru can help me

    Hi guys!
    This is easy to solve:
    You have to work in two different regions!
    <div spry:region="dsmio">
      --- Put the loader here...
    </div>
    <div spry:region="paginazione">
    content
    </div>
    You can hide the "layout" of the content by :
    <div id="content" spry:if="'{ds_PageTotalItemCount}' != ' ' ">
    content...
    </div>
    ds_PageTotalItemCount is empty during loading.....
    Have fun & keep coding

  • Gallery and spry:state

    How do I make the spry:state="loading" work with your image
    gallery? I can get it to work just fine when its loading dataset
    but when you click a thumbnail it doesnt work the same. would the
    spry:state need to be added to the gallery.js since that has the
    function that handles the changing of the image?

    Hi,
    The spry:state="loading" attribute can be used only inside a
    spry:region or spry:detailregion - it's content is diplayed while
    the
    markup gets updated, but this doesn't include the time all
    the resources inside that markup are downloaded (for example, if
    there are images inside that region, when the spry:region gets
    updated, the "loading" content is displayed only for the time the
    markup containing <img src=".."> gets inside the page.
    Loading is not displayed while the image is actually downloaded by
    the browser).
    For the gallery demo, the markup for the big image is not
    inside a spry:region because the url for the image is set from
    custom functions inside gallery.js that uses data from the existing
    datasets. It's done this way because effects are added when the
    image is displayed.
    regards,
    Dragos

  • Spry:state and dynamic accordion

    When I use a dynamic accordion (i.e. populated by a dataSet),
    the accordion functionality disappears. Here is my code. Am I doing
    something wrong, or is this just a bug?
    Thanks
    Andy
    <div spry:region="dsOrders">
    <div spry:state="loading">Data is
    loading...</div>
    <div spry:state="error">Error loading
    data...</div>
    <div spry:state="ready">
    <div id="orders" class="Accordion">
    <div class="AccordionPanel" spry:repeat="dsOrders">
    <div class="AccordionPanelTab"><h3
    spry:content="{ORDERNUM}"></h3></div>
    <div class="AccordionPanelContent"><span
    spry:content="{ORDERDATE}"></span></div>
    </div>
    </div>
    </div>
    </div>

    This might also be helpful to some. Not only do we have
    states in SPRY... but events! Here is how I did it on a site that
    has a dataset called dsOpportunities. The following HTML/Javascript
    was added to the head tags of the HTML. Then the on <body
    onload="afterReady()" > was used to make sure it was run.
    Remember that your section you are hiding needs to have a class
    with the same senario. (Or if it is unique you could do something
    simular with ID rather than class.
    <script>
    function afterReady() {
    $('pageContent').style.visibility = 'hidden';
    var iSPRY = new Object;
    iSPRY.onPostLoad = function(dataSet,data) {
    $('pageContent').style.visibility = 'visible';
    dsOpportunities.addObserver(iSPRY);
    </script>
    <style>
    .pageContent {
    visibility: hidden;
    </style>

  • Spry:state  unexpected results

    I am using Spry/AJAX to populate a page, but whenever the
    page loads you see the dynamic content tags in the form fields and
    then it reloads with the data in the form fields. Is there any way
    to make it not show the dynamic content tags and just show the form
    once the data is in the form fields? Go to the following link to
    see what I mean:
    http://www.homesandagents.com/Members/contact_info.asp?userID=10000&sessionID=&contactID=1 0064
    I tried using spry:state="loading", but it still shows the
    form with the dynamic tags first (ie. {last_name}), then the
    loading state, and then finally the ready state.

    I'm not seeing the data references when I load your page. But
    that may be due to the fact that it looks like you've added the
    SpryHiddenRegion class to your region.
    --== Kin ==--

  • Append swf file - Spry.Utils.updateContent - not work

    I don't understand this
    When I try to add swf file to Spry Tabbed Panels content -
    everything is OK. Now - in tabbed panels content I want to insert
    data from external html files. In this external file I have swf
    file and text, and images. When I preview this html external file
    in browser - all data are displayed correctly. When I try append
    this file into tabbed panels content :
    <a href="#" onclick="Spry.Utils.updateContent('apDiv1',
    'products/products1.htm'); return false;">Append file</a>
    only swf file in a new window are display.
    If I delete swf content from external html file - everything
    is ok. But if in external append file is a swf content - IE display
    only swf file.
    Is there posible to append html file with swf file in this
    method in any way?

    Hi Elaine,
    The implementation of AC_FL_RunContent() suggests that it was
    only meant to be run *BEFORE* the page finishes loading. Because
    Spry data sets and regions load and redraw asynchronously, usually
    *after* the page finishes loading, they are not compatible. As
    we've mentioned above, if Spry triggers the call to
    AC_FL_RunContent(), it will most likely be *after* the onload event
    has fired, and since AC_FL_RunContent() uses document.write() it
    will result in the entire page being overwritten by the
    <object>/<embed> tag that it writes out.
    That all said, libraries like SWFObject were designed to be
    called even after the onload event fires, at least from what I can
    tell from their samples. If you need to extract data from a data
    set to create your SWFObject, you can simply attach an observer to
    your data set that will tell the swfobject to do what it is you
    want it to do. For example:
    <script type="text/javascript">
    var dsProducts = new Spry.Data.XMLDataSet("products.xml",
    "/products/product");
    // Register an observer on dsProducts so that any time it
    changes data or the current
    // row changes, it tells the swfobject what to do:
    dsProducts.addObserver(function(notificationType, notifier,
    data)
    if (notificationType != "onDataChanged" || notificationType
    != "onCurrentRowChanged")
    return;
    // Do something with the swfobject here:
    var curRow = dsProducts.getCurrentRow();
    // The following embedSWF call is only an example of how to
    get the "productURL" column
    // value for the current row and pass it to the swfobject.
    The rest of the args, are left as names to
    // show you what you should be passing.
    swfobject.embedSWF(curRow.productURL, replaceElemIdStr,
    widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj,
    parObj, attObj);
    </script>
    --== Kin ==--

  • Cache of Spry.Utils.updateContent data?

    So I have a need for a Tab system that pulls data from other
    files to load into the tabs. Any links in those files will trigger
    the file to load into the tab (think like an iframe, but no
    iframes). If the link is to an external site it will work as
    normal. The links in my outside files don't need any js, id or
    class in them. Just normal html. With some help from the yahoo
    event and dom library I was able to detect clicks and redirect
    everything very nicely. Did I need to use YUI to do the event
    listener? Not sure, it made it pretty easy and I am no JS expert. I
    didn't see anything within spry to help in that regard.
    Example Here:
    http://dev.besavvy.com/Spry_P1_4_1214/samples/tabbedpanels/tabbed_panel_sample.htm
    My trouble comes with caching of the files. It seems FF
    caches my .html files but not .cfm ones. IE caches both. I can use
    the cfheader tags to prevent the cache I am sure, but that doesn't
    fix .html files. I know I can work around it but I wanted to check
    here as I am not clear if there is an optional attribute or another
    direction I should take. It would be very handy to have a :cache
    true :cache false type of solution.

    Try:
    Spry.Utils.updateContent('apDiv1',elTarget,null,{method:'POST'});
    which I believe will cause it to use the browsers post
    mechanism which never caches.
    Or:
    var ts = new Date();
    Spry.Utils.updateContent('apDiv1',elTarget+'&TS='+ts.toString());
    which will add a unique date string to the end of the url
    being requested making the browser believe it is a new page
    Oh if the page doesn't already have a query string change +
    '&TS=' to + '?TS='
    Regards,
    Chris Phillips
    Senior Application Developer
    www.dealerpeak.com

  • Spry.Utils.updateContent & IE caching pls help

    Hi -
    so ive read quite a few posts about this problem but no
    single - comprehensive solution. Basically im using updateContent
    to show and refresh a mini basket display on my ecom site. works
    great in firefox but in IE7 the shopping basket apparently gets
    cached the first time it gets updated and and then only updates the
    cached version thus making it appear as if you havent actually
    added anything to your cart. I know it's a cache issue cause I
    clear the cache, re-updateContent, and the most current basket
    state renders.
    It seems like this should be documented somewhere - hopefully
    someone can offer up a straightforward solution.
    Cheers
    Andy

    Hi Andy,
    By default Spry.Utils.updateContent() uses the "GET" method
    for requesting a fragment from the server. What this means is that
    you are at the mercy of the Browser's caching system and the
    caching rules specified for that fragment by the Web Server. IE6,
    not sure about IE7, also had a bug where even though the server
    says don't cache my page, IE still insists on caching the page ...
    a workaround was to append a query param to your URL that made the
    URL unique, for example the local time:
    Spry.Utils.updateContent(ele, "myfoo.php?id=12&curTime="
    + Date.now(), myCallback);
    The other workaround is to use the "POST" method. Most
    browsers don't cache results from a "POST" because that is what
    most web applications use to fetch data that changes.
    Spry.Utils.updateContent(ele, "myfoo.php?id=12", myCallback,
    { method: "POST" });
    --== Kin ==--

  • Spry.Utils.updateContent() not applying CSS styles to included fragments on mobile viewing

    NOTE THAT THIS ONLY PERTAINS TO MOBILE VIEWING (tested on iPhone)
    Hi, I have a SpryTabbedPanels widget within my index.html page, where clicking each tab calls Spry.Utils.updateContent() to load an html fragment into the body of the panel content. My index.html looks something like...
    <html>
    <head>
         <!-- All the Spry includes are done here but left out for brevity -->
         <link href="stylesheet.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
         <p>This is text that is effected by stylesheet.css</p>
        <!-- The Spry tabbed panel widget is invoked here, but only the following line is pertinent -->
              <li class="TabbedPanelsTab" tabindex="0" onclick="Spry.Utils.updateContent('frag','frag.html');">Code Fragment</li>
         <!-- The rest of the code to close up the tabbed panels widget goes here -->
    </body>
    </html>
    Then the frag.html code can be anything, and here I'll just say it's...
    <p>This is a code fragment not affected by stylesheet.css</p>
    Suppose then that I have the following style sheet called stylesheet.css...
    p {
         color:#FF0000;
    If index.html is accessed in a web browser like Chrome, Safari, etc., this code will have the obvious effect of displaying:
    This is text that is effected by stylesheet.css
    This is a code fragment not affected by stylesheet.css
    However, when mobile browsing, the style sheet is not carried over to the code fragment, so the default settings for the <p> tag are used, producing black text for the second sentence above, displaying:
    This is text that is effected by stylesheet.css
    This is a code fragment not affected by stylesheet.css
    I've tried putting <html> and <head> tags with a link to stylesheet.css in frag.html, but nothing seems to work. Any help would be greatly appreciated!
    Thanks

    I think that worked.  I've been messing around for a long time trying to
    figure it out myself watching tons of drop down tutorials.  Should have
    asked a long time ago... It was hard because I wasn't completing from
    scratch and rather updating my current site.  How could I give you the
    location on the server easily?
    Lamppa Manufacturing Inc.
    Kuuma (Green) Furnaces & (Fantastic) Sauna Stoves
    P.O.Box 422
    Tower, MN 55790
    www.lamppakuuma.com
    facebook<http://www.facebook.com/pages/Lamppa-Manufacturing-Incorporated-Kuuma-Furnaces-Sauna-Stove s/215958785138157>
    [email protected]
    1-800-358-2049
    218-753-2330

  • Spry.Utils.updateContent()

    I wonder if there is a way to evaluate the scripts contained
    in a request using updateContent()?. I've been looking for the
    answer with no success, can any one point me to the answer or tell
    me if it can be done?
    Cheers, Ivan.

    Forget this post, i've seen the change log for Spry
    PreRelease 1.4 and since then Spry.Utils.updateContent(), dependant
    of Spry.Utils.setInnerHTML(), evaluates any script.
    Thanks anyway

  • Spry state to show a message for a failed dsMonth.loadData() action

    Below is my code:
    <script type="text/javascript">
    var dsMonth = new
    Spry.Data.XMLDataSet("DATA/2008/January.xml", "month");
    function ds_setMonth(month){
    dsMonth.setURL("DATA/2008/"+month+".xml");
    dsMonth.loadData();
    </script>
    </head>
    <body>
    <input type="button" value="Set month to February"
    onclick="ds_setMonth('February')" />
    <div id="DataTable" spry:detailregion="dsMonth">
    <div spry:repeat="dsMonth">{@id} {name}
    {items}</div>
    </div>
    In case the file "DATA/2008/February.xml" doesn't exist, I
    want the region <div id="DataTable"... that previously shows the
    data from
    "DATA/2008/January.xml" to turn out blank, and contain a
    message "Data for February hasn't been updated yet". How can I do
    this?
    Thanks for all your helps.

    I should mention that in this sample I presumed the file
    existed but didn't have any data.
    <event>
    <date>
    </date>
    </event>
    If the is no file on the server, you can use the error state
    to show it.
    http://labs.adobe.com/technologies/spry/samples/data_region/RegionStatesSample.html

Maybe you are looking for

  • Where did my songs go?

    I am trying to get my song library (my own CDs, albums bought from iTunes) onto a new iPod, but only about half of it (mix of iTunes and my own CDs) moved over when I synced. The rest of the songs have an exclamation point to the right of them in the

  • What does error "__errno_location" mean"

    Hi everybody, I am creating a C program that calls a java class thru JNI. I can compile the C program in 2 ways, -with db. (Oracle 6.0) -without db. When I compile the c file without db, java calls work perfectly. When I complile the c program with d

  • Copying Chart of accounts clients

    Hi all, Can somebody tell me how to copy a chart of account and the associated G/L accounts from one client to another? Please help me in this regards. Please remember it is copying of chart of accounts across different clients and not company codes.

  • Photoshop CS5 - Thumbnails in Explorer

    I convert all my photos into dng and some I leave as raw but in any case I cannot see the photos when I do  an open in CS5 and browse to see the picture, is there something I need to download 3rd party wise to view these or am I messing up somewhere?

  • Is there any way I can trade in a macbook and get credit towards a MB PRO

    I am feeling the MB pro more than the Macbook and I wanted to know if I could trade it in and get credit toward the purchasing a MB pro. I dont mind if its at Apple or any other company.