Repeat Spry Region problems

First of all, I am very new to Spry in Dreamweaver, but have
an effect that I know must be possible to create using the Spry
Regions tools.
I have a two column webpage. On the left column I want to
have 3 rows of 3 thumbnail images that represent different work
samples. Once they are clicked, I would like a larger image and
explanation to appear in the left column (without being a new
page).
I saw a tutorial similar to this on the Adobe Design Center (
http://www.adobe.com/designcenter/video_workshop/?id=vid0166),
but instead of thumbnails, they used text, and created a Spry
Table. I don't think a table would work for me since I didn't see a
way to define the amount of rows.
I have 9 <div> tags set up with image placeholders that
I would like to link to an xml file to fill them. I cannot seem to
figure out the way to do this. My code is attached.

I can tell you categorically that the code in the Missing Manual works as intended.  If your code is not working then there is something in the code that is responsible.  We'd have to see it all to tell you....

Similar Messages

  • Spry region drop-down list problems in IE

    Can someone please help me determine the reason that IE does not display the correct item in a spry region drop-down list when first opening the site.  You can see the problem at http://www.minursemap.org/agedistnurse.html.  The initial item in the drop-down list should be Alcona with the corresponding graphic displayed in the detail region.  In Firefox, this works correctly.  When first opening the page in IE, the graphic is Alcona, but the drop-down list displays Wexford (the last item in the list).  From then on, all of the links work correctly.
    The code for the two regions is below.  Thanks in advance for assisting someone new to spry.
    <div id="ctyname">
         <div spry:region="dsChartNurse">
           <select name="name" spry:repeatchildren="dsChartNurse" onchange="dsChartNurse.setCurrentRow(this.value)">
             <option value="{ds_RowID}">{name}</option>
           </select>
      </div> <!--spry:region close -->
    </div><!--ctyname close -->
    <div id="image">
       <div spry:detailregion="dsChartNurse">
            <div align="center" style="padding-bottom:15px"><img src="{dataimage}" width="405" height="202" />
            </div><!--un-named div close -->
       </div><!-- spry:detailregion close -->
    </div><!--image close -->

    Try the following code to replace yours:
           <select name="name" spry:repeatchildren="dsChartNurse" onchange="dsChartNurse.setCurrentRow(this.value)">
             <option spry:if="{dsChartNurse::ds_RowID}=={dsChartNurse::ds_CurrentRowID}" spry:selected="selected" value="{ds_RowID}">{name}</option>
             <option spry:if="{dsChartNurse::ds_RowID}!={dsChartNurse::ds_CurrentRowID}" value="{ds_RowID}">{name}</option>
           </select>
    I hope this helps.
    Ben

  • ERROR: spry:region or spry:detailregion attribute has no data set!

    here's the basics...
    i'm running fusebox for php (if that makes any difference)
    i'm also reusing the same gallery for multiple fuseactions,
    and using my circuit.xml file to set the var $gallery
    depending on which fuseaction has been called.
    the photos already exist in a database and full size and
    thumbs have already been created by imagemagick
    i plan on writing a script that uses imagemagick to get the
    dimensions of the imagefiles and saves them to four respective new
    columns in my db table (so i hope the problem isn't related to the
    height attributes not being set in my xml.... let's hope it's
    somthing else, ok?)
    i'm creating my datasets like this
    quote:
    var dsGallery = new Spry.Data.XMLDataSet("/index.php",
    "gallery", { method: "POST", postData: "do=m.get<?php echo
    $gallery ?>Gallery", headers: { "Content-Type": "text/xml" });
    var dsPhotos = new Spry.Data.XMLDataSet("/index.php",
    "gallery/photos/photo", { method: "POST", postData:
    "do=m.get<?php echo $gallery ?>Gallery", headers: {
    "Content-Type": "text/xml"});
    the output xml is perfect... here's an example
    http://www.inkincnewyork.com/index.php?do=m.getFlashGallery
    since i'm reusing the gallery, and have no need for the
    dsGalleries related functionality i did this.
    using the long way of referencing each piece of data, just to
    make sure it's all kosher
    quote:
    <div id="thumbnails" spry:region="dsPhotos dsGallery">
    <div spry:repeat="dsPhotos"
    onclick="HandleThumbnailClick('{ds_RowID}');"
    onmouseover="GrowThumbnail(this.firstChild,
    '{dsPhoto::photo/@thumbwidth}', '{dsPhoto::photo/@thumbheight}');"
    onmouseout="ShrinkThumbnail(this.firstChild);"><img
    id="tn{ds_RowID}" alt="thumbnail for {dsPhoto::photo/@thumbpath}"
    src="{dsGallery::thumbnail/@base}{dsPhoto::photo/@thumbpath}"
    width="24" height="24" style="left: 0px; right: 0px;"
    /></div>
    <p class="ClearAll"></p>
    </div>
    but i am now getting this error
    spry:region or spry:detailregion attribute has no data set!
    for each XMLDataSet
    anyone have any ideas?

    A few things I noticed when looking at your sample source
    above:
    The "Content-Type" should be the type for the post data, not
    what you expect to get back. So in your case, you should be using:
    "Content-Type": "application/x-www-form-urlencoded";
    which is the default type so you don't really have to pass it
    to the constructor unless you are posting something other than that
    type.
    Next, your {ds_RowID} data references are missing the data
    set prefix. If you use more than one data set for a given region,
    you need to use the prefix to make sure you are getting the
    ds_RowID from the correct data set.
    The error: "spry:region or spry:detailregion attribute has no
    data set!" tells me that the data sets are not defined at the time
    Spry first processes the region. Are your data sets being created
    in a script tag in the head? Or are you creating them in some
    function that gets fired off at a specific time?
    --== Kin ==--

  • Dissapearing Spry regions

    I have two Spry:regions coming from two different datasets
    (vars I loaded in the head), NOT nested (they are independant,
    self-contained, spry:regions (divs)). When I render, only the first
    dataset is showing. However if I repeat the one dataset showing, it
    shows twice. How do I get the second spry:region to appear and stay
    onscreen? It appears briefly on the screen as the page loads, but
    this entire spry:region of the different dataset, dissapears
    completely, after retrieval of the XML, with no javascript errors.
    This is happenign in both Netscape8.1 and IE7.

    part of The CSS for center divs:
    /* center column divs
    ===================================================*/
    #centerColumn {
    margin:0px;
    padding:0px;
    display:block;
    position:absolute;
    width:497px;
    left:219px;
    top:150px;
    height:100%;
    #welcomeStoryArea {
    margin:0px;
    padding:0px;
    display:block;
    position:relative;
    float:left;
    width:497px;
    height:136px;
    background-image:url(../images/RM_welcome_bkgrd.jpg);
    background-repeat:no-repeat;
    #wakeUpCall {
    display:block;
    float:left;
    clear:left;
    margin:10px 0 0 0;
    padding:0px;
    position:relative;
    left:0px;
    width:491px;
    #DundeeCoverageUniverse {
    display:block;
    float:left;
    clear:left;
    margin:10px 0 0 0;
    padding:0px;
    position:relative;
    left:0px;
    width:491px;
    #dsRecentDundee {
    display:block;
    float:left;
    clear:left;
    margin:10px 0 0 0;
    padding:0px;
    position:relative;
    left:0px;
    width:491px;
    visibility:visible;
    /* Welcome Story area styles
    ===================================================*/
    The Head part of HTML for laoding the variables:
    <head>
    <title>Dundee Research</title>
    <link rel=stylesheet type="text/css"
    href="../css/research.css" />
    <script type="text/javascript"
    src="../js/xpath.js"></script>
    <script type="text/javascript"
    src="../js/SpryData.js"></script>
    <script type="text/javascript"
    src="../js/research.js"></script>
    <script language="javascript" type="text/javascript"
    src="/js/dwm_functions.js"></script>
    <script language="javascript" type="text/javascript"
    src="/js/dwm_toggle.js"></script>
    <!-- This is the loading of the datasets from the XMLs,
    'useCache' either forces return to server for XML data, or just to
    cache-->
    <script type="text/javascript">
    var wakeUpCall = new
    Spry.Data.XMLDataSet("../data/wakeUp.xml",
    "wakeUp/report",{useCache:false});
    var dsRecentDundee = new
    Spry.Data.XMLDataSet("../data/RecentDundeeResearch.xml",
    "recent/dundee", {useCache:true});
    var dsDundeeUniverse = new
    Spry.Data.XMLDataSet("../data/DocumentServlet.xml",
    "DundeeUniverse/Record");
    </script>
    </head>
    The DIv that is causing the problem:
    <!-- start center column enclosing all tables -->
    <div id="centerColumn">
    <!-- start Welcome and story area -->
    <div id="welcomeStoryArea">
    <h3>Welcome to Dundee Research</h3>
    <P>jdlfgkjd ldfkjg ldfkjg ldfkgj ldfkgj ldfkgj ldfkjg
    ldfkjgld kfjgld kjdlfgkjd lfkgjdlfk gjdlfkgjd lkjgldfkgjdl
    fkjg</P>
    </div>
    <!-- stop Welcome and story area -->
    <!-- Start Wake-up Call -->
    <!-- this tells the HTML this is a dynamic Spry region,
    loaded with the array from the dataset you loaded in the head
    -->
    <div spry:region="wakeUpCall" id="wakeUpCall">
    <p class="tbl_title">Wake-up Call</p>
    <table border="0" cellpadding="5" cellspacing="2"
    width="491">
    <tr>
    <th class="tbl_header" scope="col"
    onclick="wakeUpCall.sort('date'); " width="97">Date
    Published</th>
    <th class="tbl_header" scope="col"
    onclick="wakeUpCall.sort('title'); "
    width="379">Title</th>
    </tr>
    <tr spry:repeat="wakeUpCall">
    <td class="tbl_cell">{wakeUpCall::date}</td>
    <td class="tbl_cell"><a
    href="#">{wakeUpCall::title}</a></td>
    </tr>
    </table>
    <p class="more"><a
    href="#">more</a></p>
    </div>
    <!-- stop Wake-up Call -->
    <!-- start Dundee Coverage Universe -->
    <div id="DundeeCoverageUniverse">
    <p class="tbl_title">Dundee Coverage Universe</p>
    <table border="0" cellpadding="5" cellspacing="2"
    width="491">
    <tr>
    <th class="tbl_header_noSort" width="97">Date
    Published</th>
    <th class="tbl_header_noSort"
    width="379">Title</th>
    </tr>
    <tr>
    <td class="tbl_cell">23-20-2007</td>
    <td class="tbl_cell"><a href="#">Esitimates and
    Recommendations 23-Feb-07</a></td>
    </tr>
    </table>
    </div>
    <!-- stop Dundee Coverage Universe -->
    <!-- Start Recent Dundee Research -->
    <!-- this tells the HTML this is a dynamic Spry region,
    loaded with the array from the dataset you loaded in the head
    -->
    <div spry:region="dsRecentDundee" id="dsRecentDundee">
    <p class="tbl_title">Recent Dundee Research</p>
    <table border="0" cellpadding="5" cellspacing="2"
    width="491">
    <tr>
    <th class="tbl_header" scope="col"
    onclick="dsRecentDundee.sort('date'); " width="97">Date
    Published</th>
    <th class="tbl_header" scope="col"
    onclick="dsRecentDundee.sort('title'); "
    width="379">Title</th>
    </tr>
    <tr spry:repeat="dsRecentDundee">
    <td class="tbl_cell">{dsRecentDundee::date}</td>
    <td class="tbl_cell"><a
    href="#">{dsRecentDundee::title}</a></td>
    </tr>
    </table>
    <p class="more"><a
    href="#">more</a></p>
    </div>
    <!-- stop Recent Dundee Research -->
    </div>
    <!-- stop center column enclosing all tables -->
    Text
    Text
    The sample XML file of RecentResearch:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <recent>
    <dundee id="1">
    <date>28-02-2007</date>
    <title>Focus on the Juniors - 2007: Dundee's Mineral
    Exploration Stock Watch</title>
    </dundee>
    <dundee id="2">
    <date>23-02-2007</date>
    <title>Canadian Banks - No Need to Fear the
    Future</title>
    </dundee>
    <dundee id="3">
    <date>19-02-2007</date>
    <title>Aeroplan Income Fund - Set to
    Soar</title>
    </dundee>
    <dundee id="4">
    <date>13-02-2007</date>
    <title>Mirabela Nickel Limited - Succeeding at Santa
    Rita</title>
    </dundee>
    <dundee id="5">
    <date>07-02-2007</date>
    <title>Breaker Energy Ltd. - Stable & Consistent
    Growth in a Wave of Uncertainty</title>
    </dundee>
    </recent>
    The sample XML file that is working:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <wakeUp>
    <report id="1">
    <date>08-03-2007</date>
    <title>CCL, Current Market Statisitics, Daily Summary,
    Estimate Tables</title>
    </report>
    <report id="2">
    <date>08-03-2007</date>
    <title>CCL, Current Market Statisitics, Daily Summary,
    Estimate Tables</title>
    </report>
    <report id="3">
    <date>07-03-2007</date>
    <title>SW, Current Market Statisitics, Daily Summary,
    Estimate Tables</title>
    </report>
    <report id="4">
    <date>06-03-2007</date>
    <title>ACG, TET.UN, Current Market Statisitics, Daily
    Summary, Estimate Tables</title>
    </report>
    <report id="5">
    <date>05-03-2007</date>
    <title>Current Market Statisitics, Coming Events,
    Daily Summary, Estimate Tables</title>
    </report>
    </wakeUp>
    Text

  • How do I display on-the-fly generated XML on a web page using DW CS4 Spry regions?

    On a main web page I'm trying to display formatted data from an ASP page that generates XML on-the-fly from a query.
    When I run the ASP page from the browser, the XML formatting of the data works. But when I run the main web page, the data doesn't display.
    I'm using  DW CS4 Spry regionsto display the data on the main page from the XML data generated by the ASP page. Here's the main page code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache" >
    <html>
    <head>
    <script type="text/javascript" src="SpryAssets/xpath.js"></script>
    <script type="text/javascript" src="SpryAssets/SpryData.js"></script>
    <script type="text/javascript" src="SpryAssets/SpryUtils.js"> </script>
    <script type="text/javascript">var A1D1xml = new Spry.Data.XMLDataSet("A1D1ACRs_testWxmlCode.asp", "tests/test");</script>
    <title>Test XML Main</title>  
    </head>
    <body>
          <div id="A1D1xml" spry:region="A1D1xml">
                                    <table id="A1D1">
                <tr>
                <th>ID</th>
                <th>Last Name</th>
                <th>Final Status</th>
                </tr>
                <tr spry:repeat="A1D1xml">
                       <td>{acr_id}</td>
                    <td>{acr_lastName}</td>
                    <td>{acr_final_status}</td>
                </tr>
                  </table>
             </div>
    </body>
    </html>
    Here's the code for the page that generates the XML: A1D1ACRs_testWxmlCode.asp
    <html>
    <%
    set objConn=server.CreateObject("ADODB.Connection")
    objConn.Open application("web_test")
    set rs = objConn.Execute( "SELECT acr_id, acr_lastName, acr_final_status from acr_records_grid_view where acr_changeOption = 'A1D1'")
    Response.ContentType = "text/xml"
    Response.AddHeader "Pragma", "public"
    Response.AddHeader "Cache-control", "private"
    Response.AddHeader "Expires", "-1"
    %>
    <?xml version="1.0" encoding="utf-8"?>
    <tests>
      <%While (NOT rs.EOF)%>
                    <test>
                                    <ID><%=(rs.Fields.Item("acr_id").Value)%></ID>
                                    <acr_lastName><![CDATA[<%=(rs.Fields.Item("acr_lastName").Value)%>]]></acr_lastName>
                                    <acr_final_status><![CDATA[<%=(rs.Fields.Item("acr_final_status").Value)%>]]></acr_final_s tatus>
                    </test>
        <%
                    rs.MoveNext()
                    Wend
      %>
    </tests>
    <%
    rs.Close()
    Set rs = Nothing
    %>
    </html>
    Thanks.

    Thanks, but no; I'm using the correct case and folder.
    With this code on the main page, The region flashes the table column header names
    and the code as written for the spry repeat; then instantly disappears from the screen.
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript" src="SpryAssets/xpath.js"></script>
    <script type="text/javascript" src="SpryAssets/SpryData.js"></script
    <script type="text/javascript">var A1D1x = new Spry.Data.XMLDataSet("A1D1ACRs_testWxmlCode.xml", "tests/test");</script>
    <title>Test XML Main</title>  
    </head>
    <body>
          <div id="A1D1" spry:region="A1D1x">
                   <table id="A1D1a">
                <tr>
                <th>ID</th>
                <th>Last Name</th>
                <th>Final Status</th>
                </tr>
                <tr spry:repeat="A1D1x">
                    <td>{acr_id}</td>
                    <td>{acr_lastName}</td>
                    <td>{acr_final_status}</td>
                </tr>
                  </table>
             </div>
    </body>
    </html>

  • Air and spry (adding observer and addEventListener to spry regions links to open for a new window)

    I'm trying to add a region.addobserver and addEventListener to spry regions so the links; that come for a external feed, opens in a new(default browser) window when clicked. The on*  events in regions do not work in AIR so, is there a way to do this?
    I have read a lot of the documentation on spry regions, addObserver and the addEventlistener but the samples don't deal with anything about external xml feeds with links in a spry region for a AIR app.
    The closiest i saw was the gallery http://labs.adobe.com/technologies/spry/articles/air/photo_gallery.html,  but it doesn't deal with:
    links,
    in a external RSS feed,
    in the spry region,
    to a new default browser.
    Has anybody  tried this before? Can it be done?
    Ex:
              <div spry:region="rssDataNews" class="SpryHiddenRegion">
              <div spry:state="loading" id="notification2">Loading feeds, please wait ...<img src="assets/spinner.gif"></div>
              <div spry:state="error">Failed to load data! Please try again later</div>
                <table width="100%" spry:state="ready">
                  <tr spry:repeat="rssDataNews" class="{ds_EvenOddRow}" spry:select="mySelectClass">
                    <td class="cellPad">
                    <span style="font-weight:bold">{title}</span><br /><br />
                    {description}<br />
                     <a href="{link}" target="_blank">[Read full article]</a><br /><br />
                    </td>
                  </tr>
                </table>
          <div>
    The <a href > only opens the url in the native AIR window. I need it to open in a web browser.
    Message was edited by: dee12345654321

    About on* events
    They do work, but not as attribute on your HTML elements, you will need to use eventlisteners to attach them on the relevant nodes.
    How: http://labs.adobe.com/technologies/spry/samples/dom_utils/add_event_listener.html
    About links
    Currently in Adobe AIR, its not (easily) possible to open or execute other programs on the users PC. I have seen die hard hacker user Java to get around this limitation. But i suggest you check out the Adobe AIR forum to confirm that you cant open links in the users browser.
    But, Adobe AIR is basically a browser

  • Spry:region - Update

    Hi,
    I'm a beginner in programming with Adobe Spry so I don't know
    if I already understood the Spry concept correctly or if my
    question has already been answered in this forum before.
    I have got an XML file on my web server which contains the
    address data of a single user in the following way:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <adressbook>
    <contact id='1'>
    <name>Person 1</name>
    <company>his company</company>
    </contact>
    </adressbook>
    The xml file is dynamically generated and can be called with
    a GET-parameter "contact" which represents the contact id of the
    contact whose address data should be delivered in the response.
    Now I read something about the Adobe Spry data set concept.
    So I wanted to implement a small address book widget by fetching
    the data of a chosen contact from the server in the following way:
    <script type="text/javascript">
    var contactinfo = null;
    function getcontactinfo(contactid) {
    contactinfo = new
    Spry.Data.XMLDataSet("data.xml.php?contact=" + contactid,
    "/adressbook/contact", { useCache: false });
    </script>
    <div id='names'>
    <a href='javascript:getcontactinfo(1)'>Person
    1</a><br>
    <a href='javascript:getcontactinfo(2)'>Person
    2</a><br>
    </div>
    <div id='info' spry:region="contactinfo">
    <table spry:repeatchildren="contactinfo">
    <tr><td>name:</td><td>{name}</td></tr>
    <tr><td>company:</td><td>{company}</td></tr>
    </table>
    </div>
    My problem is that the spry:region won't be updated after
    requesting new data via Spry.Data.XMLDataSet(). If I leave out the
    getcontactinfo()-function and simply write something like
    var contactinfo = new
    Spry.Data.XMLDataSet("data.xml.php?contact=1",
    "/adressbook/contact", { useCache: false });
    everything works fine. Can anybody help me and could give me
    a hint what I might do wrong.
    Thanks a lot
    André Langer
    P.S.: btw. does anybody know if there's an option in the
    spry:repeatchildren part to implement a similar behaviour like in
    XSL where I could find out the tag names (in Spry the column
    names), see
    <xsl:for-each select="/adressbook/contact/*">
    <tr><td><xsl:value-of
    select="name()"/>:</td><td><xsl:value-of
    select="."/></td></tr>
    </xsl:for-each>

    Hi Ala,
    Look into the setURL and loadData functions.
    http://labs.adobe.com/technologies/spry/articles/data_set_overview/
    You can so something like
    <a onClick="
    contactinfo.setURL('data.xml.php?contact={contactid}');
    contactinfo.loadData();")
    http://labs.adobe.com/technologies/spry/samples/data_region/SetURL.html
    Hope this helps.
    Don

  • Dreamweaver rewriting spry:region

    When I save a template that contains a Spry dataset and
    region, Dreamweaver changes the region to "datasetname function".
    When the template loads the code is:
    spry:region="dsAirsale"
    when I save the file, it becomes:
    spry:region="dsAirsale function"
    Why?

    I've never seen/heard of this problem. Do you have a sample
    file we can look at to reproduce the problem? Are you talking about
    saving the .dwt file? Or an HTML file that is an instance of the
    template? Is the spry:region inside an editable region?
    --== Kin ==--

  • IE8 Spry Region Throws "Expected ':' "

    Anyone know what might cause IE8 (and as far a I can tell, only IE8 - haven't tested in IE7) to throw a javascript error saying "Expected ':'" within a spry:region / spry:repeat variable?  A la:
    <LI spry:repeat="listsdata">
                      <span onclick="getLists({listsdata::ID})">{listsdata::name}</span>
                      <input type="button" value="-Group" onclick="deleteListGroup({listsdata::ID})" />
              </LI>
    You can see the behavior here: http://www.listcosa.com/
    I've been using Spry on and off for some time, including a very similar project - with no such issues.

    Well, I'm not sure where you're replicating that.  That's not the lines or error IE8 gives me.  IE8 gives me:
    Message: Expected ':'
    Line: 132
    Message: Expected ':'
    Line: 134
    Message: Expected ':'
    Line: 148
    Message: Expected ':'
    Line: 151
    Message: Expected ':'
    Line: 152
    Message: Expected ':'
    Line: 153
    Message: Expected ':'
    Line: 160
    Message: Expected ':'
    Line: 165
    Message: Expected ':'
    Line: 169
    Which refers to these lines:
    <span onclick="getLists({listsdata::ID})">{listsdata::name}</span>
    <LI spry:repeat="listdata"> {name} <input type="button" value="-List" onclick="deleteList({ID})" />
    <span ondblclick="displayEditItem({itemdata::ID})" id="display{itemdata::ID}" class="showitem">{itemdata::name}
    <input type="button" value="E" onclick="displayEditItem({itemdata::ID})" />
    <input type="button" value="-Item" onclick="deleteItem({itemdata::ID},{ID},{groupid})" />
    <input type="button" value="Save" onclick="editItem({itemdata::ID},{ID},{groupid})" />
    <input type="button" value="+Item" onclick="addItem({ID},{groupid})" />
    <input type="button" value="+List" onclick="addList({listheader::groupid})" />
    Which is an odd subset of variable binding within Spry regions.  Other browsers show no error, IE8 displays no further errors (this is only on the initial loading of the XMLDataSets).          

  • Execute code after Spry region redrawn / added to DOM

    Hi,
    I'm integrating my Spry event data with a YUI calendar.
    Everything is working and event dates are highlighted on the YUI calendar.  There is one last thing I wish to do which is to update the YUI calendar with a Spry Tooltip.  The div regions for the tooltip text are generated dynamically by via a Spry repeating region.  What I am failing to do is attach the tooltips to the YUI calendar after the Spry repeating region has been added to the docuement DOM. So the Spry Tooltip function cannot find the ID of the tooltips.
    I have a dataset observer "onpostload" which seems to fire when the data is loaded but before the document dom has been updated by Spry.  How can I ensure I wait for Spry to update the region and hence DOM with the new data before triggering the tooltip code?
    Cheers
    Phil

    You got different kind of observers in Spry Data.
    - Dataset observers:
         datasetname.addObserver( observer )
    - Spry Region Observers:
         Spry.Data.Region.addObserver( 'region-id', observer );
    The dataset observers send out notifications when there is a event happening inside the Spry Data Sets. The one you mentioned is part of this (onPostLoad). These are great to monitor your data changes, but in your case. You don't want to use these.
    The Spry region observers respond to events that are happening in side the region. For example onPreUpdate, this event is called when the region is about to generate / insert new markup in to your region. But you also got the onPostUpdate. This is the observer you are looking for, it gets called once the region has re-generated its code / html. It gets fired directly after the new HTML has been inserted.
    Small note about the region observers, these require a id= attribute. This id attribute must be placed on the same element as the spry:region. To learn, and read more about the observers i would like to referrer you to this article:
    Data Set and Region Overview
    Its rather large, but using the browser build in find function you should be able to locate the sections about the observers
    Hopes this helps,

  • Can you specify spry:region to call a dataset dynamically?

    Hi. I am new to spry. I have a certain number of different datasets within 1 html page, let's say i have ds1, ds2, ds3 and so on..
    So the calling page now should have a drop down select menu that will enable the user to call on the appropriate dataset based on the selected option he did.
    Any idea? is this possible? I dont think filter will be good here since my data is coming from different datasets.. so i was thinking of having spry:region=whateverthevalueoftheuserhasselected.value. but for the intellisense i should specify a "specific" dataset name. but it should be a variable. please help!!! Thank You!!!

    Wow this is great! It working!!!! thanks for this! I'll post my solution for others' reference as well.
    The code below is my solution to switch to display 3 different datasets by user selection.
    Here's for the script in the <head>
    <script type="text/javascript">
    var testDS = new Spry.Data.HTMLDataSet("testsschedule.html", "test");
    var testDS2 = new Spry.Data.HTMLDataSet("testsschedule.html", "test2");
    var testDS3 = new Spry.Data.HTMLDataSet("testsschedule.html", "test3");
    var dsShell = new Spry.Data.DataSetShell(testDS);
    function ChangeDS(selectObject)
    var selectedValue = selectObject.options[selectObject.selectedIndex].value;
    switch(selectedValue)
    case "testDS":
               dsShell.setInternalDataSet(testDS, true);
              break;
    case "testDS2":
               dsShell.setInternalDataSet(testDS2, true);
              break;
    case "testDS3":
               dsShell.setInternalDataSet(testDS3, true);
              break;
              default:
              break;
    </script>
    Here's the select option code:
    <select name="selectCategory" id="selectCategory" onchange="ChangeDS(this)";>
    <option value="testDS">Option1</option>
    <option value="testDS2">Option2</option>
    <option value="testDS3">Option3</option>
    </select>
    And here's my div to display the dataset!
    <div id="liveTable" spry:region="dsShell" class="SpryHiddenRegion">
    <table border="1" class="dataTable">
       <tr>
         <th spry:sort="@id">@id</th>
         <th spry:sort="CourseName">CourseName</th>
         <th spry:sort="January">January</th>
         <th spry:sort="January">Februaru</th>
       </tr>
       <tr spry:repeat="dsShell">
         <td>{@id}</td>
         <td>{CourseName}</td>
         <td>{January}</td>
         <td>{Februaru}</td>
       </tr>
    </table>
    </div>
    Thanks big time gramps!!!

  • Usinh HTMLPanel, TabbedPanels and Spry Regions

    Hello,
    I'm using HTMLPanel Widget to load an HTML file that has a
    TabbedPanels whose content holds spry regions. I am getting the
    TabbedPanels but I don't get the spry regions being generated
    within them. I have the markup first...and then the dataset
    instance...
    quote:
    <div class="TabbedPanelsContent"
    spry:region="dsMenuItems">
    <table width="100%">
    <tr>
    <th nowrap="nowrap" bgcolor="#B8C8DC">Content ID
    </th>
    <th nowrap="nowrap" bgcolor="#B8C8DC">Content
    Name</th>
    <th nowrap="nowrap"
    bgcolor="#B8C8DC">Section</th>
    <th nowrap="nowrap" bgcolor="#B8C8DC">File Type
    </th>
    <th nowrap="nowrap"
    bgcolor="#B8C8DC">Column</th>
    <th nowrap="nowrap" bgcolor="#B8C8DC">Order</th>
    <th nowrap="nowrap"
    bgcolor="#B8C8DC">Actions</th>
    </tr>
    <tr spry:repeat="dsMenuItems" spry:test="'{column}' ==
    'left'">
    <td align="center" valign="top">{contentid}</td>
    <td align="center" valign="top">{name}</td>
    <td align="center" valign="top">{section}</td>
    <td align="center" valign="top">{filetype}</td>
    <td align="center" valign="top">{column}</td>
    <td align="center" valign="top">{order}</td>
    <td align="center" valign="top">
    <a spry:if="'{order}' > 1" href="javascript:void(0);"
    onclick="getMenus('order={order}&dir=up&column={column}')">[up]</a>
    <a spry:if="('{order}' < getNoItems('{column}'))"
    href="javascript:void(0);"
    onclick="getMenus('order={order}&dir=down&column={column}')">[down]</a>
    <a href="javascript:void(0);"
    onclick="getMenus('delete=true&contentID={id}&column={column}')">[delete]</a></td>
    </tr>
    </table>
    </div>

    sorry about not providing an example...i have it on local
    machine.
    the html page that has the markup as i quoted and the script
    quote:
    <script>var dsMenuItems = new
    Spry.Data.XMLDataSet('?task=menus&a=get_content&menu_id=17',"/records/record",{
    useCache: false});
    dsMenuItems.setColumnType("order","number");
    dsMenuItems.sort("order","ascending");
    </script>
    the HTML Panel is set to evaluate javascript. i get no
    errors. are you sying to use observer on Panel? or on
    tabbed?

  • Spry regions not being viewed

    Hi there.
    Me and an associate of mine have been doing a small website
    development project that uses spry regions on one of their pages
    (LINK:
    http://www.whytype.com/dev/solutions.html
    ). The XML it references is "products.xml"
    The page itself functions fine locally (displays all aspects
    in firefox) but when uploaded via ftp (including dependent files),
    they don't show up.
    We have all the extensions loaded properly and referenced
    correctly in the page, but regardless it won't display. Could the
    flash banner interfere with it? Is it a code problem or a back-end
    server issue (FYI, server is an Apache 1.3). Any help would be
    appreciated. Thanks in advance.

    Try loading your XML data file directly:
    http://www.whytype.com/dev/products.xml
    I get a parser error because nothing is returned.
    --== Kin ==--

  • Spry Regions and Selection of First Element

    I've done a little work with spry regions and am currently struggling with how to interact with the generated content via Javascript.
    Specifically (I'm not using a Spry DataGrid BTW) I'm trying to do something like document.getElementById("st").focus(); on the first anchor in the returned dataset. I haven't put the ID in yet because I'm not sure exactly what to use (maybe @id) but how to capture the first one for the reference in the final .focus() call.
    Anybody done this before?
    <!--- list panel --->
    <div spry:region="dsCompanies" style="clear:both;">
    <div spry:repeat="dsCompanies">
    <div class="card" >
    <p><b><a href="#" onclick="loadcompany('{@id}','contacts');searchpanel.displayPopupDialog(false);return false;">{name}</a></b>
    <br>{rectype}
    <br>{name}
    <br>{support}
    <br>{address1}
    <br>{address2}
    <br>{address3}
    <br>{city}, {state} {zip}
    </p>
    </div><!--- end of card --->
    </div> <!--- end of spry region --->
    <p spry:state="loading"> Please Wait...</p>
    </div> <!--- end of panel --->

    You can apply focus to form elements and anchors/links. In this case I am attempting to set the focus to the <a href> tag.. but only the first in the repeating region.
    <HTML>
    <BODY>
    <a id="foo1" href="#"> This</a>
    <a id="foo2" href="#"> That</a>
    <script type="text/javascript">
      // selects 'that'
      document.getElementById("foo2").focus();
    </script>
    </BODY>
    </HTML>

  • Spry Tabbedpane problem

    Hi,
    I'm combining what I learned in creating a spry photo album
    with using a tabbed pane for the thumbnails. But every time I add
    another pane of thumbnails, the previous ones disappear. See what I
    mean here:
    http://www.dananourie.com/portfolio.html
    Each tab changes correctly, but the thumbnails aren't showing up,
    except for the first one.
    This is the code that I have at the top of my page to call
    the xml file for each type of photos:
    <script type="text/javascript">
    var dsGallery = new Spry.Data.XMLDataSet("scenicphotos.xml",
    "/gallery3/photos/photo");
    var dsData = new Spry.Data.XMLDataSet("scenicphotos.xml",
    "/gallery3");
    </script>
    <script type="text/javascript">
    var dsGallery2 = new Spry.Data.XMLDataSet("naturephotos.xml",
    "/gallery4/photos/photo");
    var dsData2 = new Spry.Data.XMLDataSet("naturephotos.xml",
    "/gallery4");
    </script>
    <script type="text/javascript">
    var dsGallery3 = new Spry.Data.XMLDataSet("travelphotos.xml",
    "/gallery5/photos/photo");
    var dsData3 = new Spry.Data.XMLDataSet("travelphotos.xml",
    "/gallery5");
    </script>
    <script type="text/javascript">
    var dsGallery4 = new Spry.Data.XMLDataSet("stockphotos.xml",
    "/gallery6/photos/photo");
    var dsData4 = new Spry.Data.XMLDataSet("stockphotos.xml",
    "/gallery6");
    </script>
    <style type="text/css">
    Then where the code for the panes are:
    <div id="TabbedPanels1" class="TabbedPanels">
    <ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab"
    tabindex="0">Scenic</li>
    <li class="TabbedPanelsTab"
    tabindex="0">Nature</li>
    <li class="TabbedPanelsTab"
    tabindex="0">Travel</li>
    <li class="TabbedPanelsTab"
    tabindex="0">Stock</li>
    <li class="TabbedPanelsTab" tabindex="0">Digital
    Art</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
    <div class="TabbedPanelsContent">
    <div id="thumbs" spry:region="dsGallery dsData">
    <img src="{dsData::thumbnail/@base}{@thumbpath}"
    spry:repeat="dsGallery" class="thumbs"
    onclick="dsGallery.setCurrentRow('{ds_RowID}');" />
    </div></div>
    <div class="TabbedPanelsContent">
    <div id="thumbs" spry:region="dsGallery2 dsData2">
    <img src="{dsData2::thumbnail/@base}{@thumbpath}"
    spry:repeat="dsGallery2" class="thumbs"
    onclick="dsGallery2.setCurrentRow('{ds_RowID}');" />
    </div></div>
    <div class="TabbedPanelsContent">
    <div id="thumbs" spry:region="dsGallery3 dsData3">
    <img src="{dsData3::thumbnail/@base}{@thumbpath}"
    spry:repeat="dsGallery3" class="thumbs"
    onclick="dsGallery3.setCurrentRow('{ds_RowID}');" />
    </div></div>
    <div class="TabbedPanelsContent">
    <div id="thumbs" spry:region="dsGallery4 dsData4">
    <img src="{dsData4:thumbnail/@base}{@thumbpath}"
    spry:repeat="dsGallery4" class="thumbs"
    onclick="dsGallery4.setCurrentRow('{ds_RowID}');" />
    </div></div>
    <div class="TabbedPanelsContent">Content 5</div>
    </div>
    </div>
    I don't understand why each pane can't just pull in the
    photos as the first one does. I can have two panes working, but
    when I had a third, it hoses the one before it. You can see how it
    should work as shown on my home and bio pages.
    thanks!!! Dana

    Well, you are changing the right style selector.
    I suggest you use the vertical image element as a background image in the menu items themselves, then they will be harmoniously positioned with the menu.
    You can give each menu item its own width (in the stylesheet), if you need to, but for heaven's sake, get rid of those huge padding measurements. Pad enough on the right to disclose the vertical image, but try centering the text in each button instead of using padding to move it around.
    Beth

Maybe you are looking for

  • Font in Preview blurry

    In Yosemite, when I look at a pdf file in Preview the fonts are blurry compared to Mavericks. The upper image below is a screenshot using Mavericks, and the lower one is from Yosemite. I tried fiddling with LCD font smoothing in preferences, and rest

  • FLV video won't play in Windows

    Hi, I'm creating a stand-alone [projector] flash player presentation. In it, I have a FLV playing. I'm using the FLVPlayback component to play the file. It works perfectly on my Mac, but when I try it out in Windows XP, it doesn't play the video. Eve

  • Changes in iPhoto Not Updated in iWeb site.

    I made some changes to the photos (color correction, red eye removal, etc.) I am using to a published site on the web (using iPhoto and iWeb), but the changes are not being reflected in iWeb. I can't seem to find any way to refresh the images. Is the

  • Movies on External HDD

    I transfer my movies to an external HDD to save space on my MacBook after they have been viewed. I basically just copy and paste it to the HDD, delete from my MacBook, then re-add to the iTunes library. I have the external HDD setup wirelessly throug

  • Oracle Enterprise Manager 10g Grid Control Release 5

    Hi All, Has anyone here already using Oracle Enterprise Manager 10g Grid Control Release 5? Currently we are using Release 2 of Oracle Enterprise Manager as a package upon installation of Oracle 10g. Curious about Release 5 I want to try it out in ou