Spry region XML issue

I'm developing an interactive menu using the Spry and Ajax framework that lists the menu items on the left (in a Spry accordion) to a corresponding image and description on the right. I have the basic functionality working, however, my menu items are broken into sub categories, and I can't seem to get my XML file to separate these.
For an example of what I'm trying to do, visit here: http://bit.ly/g0RrU
As you can see, my menu is broken into sections; i.e. Tapas, Pizzas, Entrees...etc. Do I need to link a separate XML file to each of these sections, or can I simply make one more generation in my XML file.
For instance, could my XML file look like this:
<?xml version="1.0" encoding="UTF-8"?>
<menu>
     <tapas>
       <item>
          <name>Fresh Tilapia Dip</name>
          <title>Fresh Tilapia Dip</title>
          <image>../one0one/images/food/crab_cakes.jpg</image>
          <desc>Mesquite Smoked Fresh Fish w/ Tortilla Chips and Pickled Jalapenos $6.99</desc>
       </item>
       <item>
            <name>Jamaican Jerk Chicken Satay</name>
          <title>Jamaican Jerk Chicken Satay</title>
          <image>../one0one/images/food/satay.jpg</image>
          <desc>Served with Pineapple Chutney w/ 101’s Spicy Tartar. $9.99</desc>
       </item>
       </tapas>
       <pizzas>
               <name>Pizza1</name>
               <title>Pizza1</title>
               <image>img.jpg</image>
               <desc>description</desc>                      </pizzas>
</menu>
This is actually how it is currently set up, but when I link the XML file to a Spry region, it ignores the <tapas> and <pizzas> categories, and goes straight to the <item>. What's the best practice to achieve this menu effect?

What version of Spry are you using? If you are going to work
Spry and AIR, you will need Spry 1.6.1 to work within AIR's
application sandbox. You can find the details here:
http://labs.adobe.com/technologies/spry/air.html
and a case study that shows what I had to do to make the
Photo Gallery work in AIR 1.0 here:
http://labs.adobe.com/technologies/spry/articles/air/photo_gallery.html
--== Kin ==--

Similar Messages

  • 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>

  • Formatting tags in xml data set used for spry region

    I am trying to put <p>,,,</p> tags in my xml data set but they cause the field to not load. For example I would like to create an xml file as follows:
    <blog>
          <blogentry>
              <blogdate>Jan 2009</blogdate>
              <blogtitle>January Blog</blogtitle>
              <blogtext><p> this is a paragraph</p>
    <p>and so is this</p>
              </blogtext>
         </blogentry>
    </blog>
    When I do this I don't get anything in the spry region.  If I remove the <p>,</p> tabs it works.
    Is there anyway to do this (not just with <p> but with any tags ... ie. tables, etc.).
    Thanks/Hal

    I have an online example:
    http://www.pearlmanpr.com/perspective_test.html
    The spBlog.xml file contains test junk.  If I put the <[[CDATA....]]> inside the BlogEntry/BlogText tag it doesn't work at all.
    http://www.pearlmanpr.com/perspective_test_2.html
    If I use it without the <[[CDATA..]] it doesnt work either.
    http://www.pearlmanpr.com/perspective_test_3.html
    If I use it without any <> within the tag it sort of works (still needs to be aligned).

  • Spry Dataset XML Import Blank (Where's the problem?)

    I have a weird predicament I've worked myself into and need to figure out a way to clean up this process.
    Background: I am working within the constraints of a content management system that doesn't have full content management capabilities, switching CMS is not an option, server I believe is Tomcat, but JSP/ASP/PHP I think is irrelevant because of the constraints of the CMS.  The current dilemma I have is that they want a list built on a page, 40 items per page.  Very manual process.  Get Excel list --> Move to HTML --> And then playing musical chairs rotating things around.  This last part is the reason I'd like to move it towards XML.  It might not be as pretty, but I'm hoping to eliminate as much tedious coding as I possibly can (code looks bad enough as it is, no where near valid, definitely not accessible for Murray, but out of my control as far as changing at the moment).
    The project also moves around so not everyone has the same software and moving to a database, is not an option.
    Where I'm at: Because there are multiple parties involved the only link between them is the dreaded Micrsoft Office (v. 2007).  So I figured it was worth a shot looking into Excel's XML capabilities.  I created the XSD file for Excel to map from, and let Excel save the file as XML.  Now I have used the XML feature before in DW with datasets using XML files that either I hand-coded or where cached from database queries.  I tried to import it into DW and normally where you preview the data, in this case, nothing is visible.  So my first though is, maybe the XML from Excel doesn't validate, but then it does so that doesn't appear to be the issue. It validates just fine.
    My ideal is that users can save just an Excel file and when these pages are made, the XML can be exported for DW and then if things need to be re-ordered they can easily do it in Excel which everyone has, but the web person can just upload an XML.  Below is the XML and XSD files that were used.  There is only one row of data in the XML file and data is sample data because of proprietary things.  Any help with this problem is greatly appreciated.
    XSD:
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="list">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="list_item" minOccurs="1" maxOccurs="unbounded">
              <xs:complexType>
                <xs:attribute name="name" type="xs:string" use="required" />
                <xs:attribute name="address" type="xs:string" use="required" />
                <xs:attribute name="imagepath" type="xs:string" use="required" />
                <xs:attribute name="product" type="xs:string" use="required" />
                <xs:attribute name="productlink" type="xs:string" use="required" />
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    XML:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <list>
              <list_item name="google" address="http://www.google.com" imagepath="image/path/image.jpg" product="googles" productlink="http://www.somedomain.com/index.html"/>
    </list>

    I do not see a problem with the XML file. In fact I used the data as a file called untitled1.xml in the following
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <script src="http://labs.adobe.com/technologies/spry/includes_minified/xpath.js"></script>
    <script src="http://labs.adobe.com/technologies/spry/includes_minified/SpryData.js"></script>
    <script type="text/javascript">
    var ds1 = new Spry.Data.XMLDataSet("untitled1.xml", "list");
    </script>
    </head>
    <body>
    <div spry:region="ds1">
      <table>
        <tr>
          <th spry:sort="list_item">List_item</th>
          <th spry:sort="list_item/@address">List_item/@address</th>
          <th spry:sort="list_item/@imagepath">List_item/@imagepath</th>
          <th spry:sort="list_item/@name">List_item/@name</th>
          <th spry:sort="list_item/@product">List_item/@product</th>
          <th spry:sort="list_item/@productlink">List_item/@productlink</th>
        </tr>
        <tr spry:repeat="ds1">
          <td>{list_item}</td>
          <td>{list_item/@address}</td>
          <td>{list_item/@imagepath}</td>
          <td>{list_item/@name}</td>
          <td>{list_item/@product}</td>
          <td>{list_item/@productlink}</td>
        </tr>
      </table>
    </div>
    </body>
    </html>
    and it works fine.
    However, if I that was confronted with the problem, I would save the Excel file to a CSV and use the Spry CSV Data Set as per http://labs.adobe.com/technologies/spry/samples/data_region/CSV_sample.html
    Gramps

  • 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 in AIR issue

    I've just started using AIR & Spry and am having problems
    getting the Spry.Data.XMLDataSet working when I convert it to an
    AIR app. It works fine in my local html but I get the error:
    spry:region or spry:detailregion attribute has no data set!
    when I load the AIR application. My xml doc is sitting in the
    same folder as the html page.
    I can read data from an xml file using the XMLHttpRequest
    object.
    Is this a known issue? Any ideas?
    Thanks.

    What version of Spry are you using? If you are going to work
    Spry and AIR, you will need Spry 1.6.1 to work within AIR's
    application sandbox. You can find the details here:
    http://labs.adobe.com/technologies/spry/air.html
    and a case study that shows what I had to do to make the
    Photo Gallery work in AIR 1.0 here:
    http://labs.adobe.com/technologies/spry/articles/air/photo_gallery.html
    --== Kin ==--

  • Spry Tabbed XML data panels within HTMLPanel not working.

    Many thanks for reading.
    s
    I trying to provide a rapid solution using adobe's samples
    to make Spry Tabs work within an html panel (in order to avoid
    many links in my page).
    I am using the following code:
    initial page with html panel with the ready products.js to parse the links:
    <script src="../SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryPagedView.js" type="text/javascript"></script>
    <script src="../SpryAssets/SpryDOMUtils.js" type="text/javascript"></script>
    <script  src="../SpryAssets/SpryHTMLPanel.js" type="text/javascript"></script>
    <script language="JavaScript" type="text/javascript" src="../SpryAssets/SpryDataExtensions.js"></script>
    <script src="SpryNestedXMLDataSet.js" type="text/javascript"></script>
    <script src="../SpryAssets/products.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="TabbedPanels/SpryTabbedPanels.css"/>
    <script src="TabbedPanels/SpryTabbedPanels.js"></script<script type="text/javascript">
    var ds1 = new Spry.Data.XMLDataSet("ajaxbibliaxmlbridgetitle.php", "root/row[katigoria=1]", {sortOnLoad: "ID_BIBLIOU", sortOrderOnLoad: "ascending"});
    var pv1 = new Spry.Data.PagedView( ds1 ,{ pageSize:10 });
    var pv1PagedInfo = pv1.getPagingInfo();
    //var TabbedPanels1 = new Spry.Widget.TabbedPanels();          
    </script>
    </head>
    <body class="twoColFixRtHdr">
    <div id="container">
    <div id="sidebar1">
      <div id="productPageLinks">
       <ul>
        <li><a href="index.php">Index</a></li>
        <li><a href="booklist.php">Product List</a></li>
            <li><a href="test.php">Σχετικά με τη Βιβλιοθήκη</a></li>
       </ul>   
      </div>
    </div>
    <div id="mainContent">
    <br />
    <div class="HTMLPanelLoadingContent"> Waiting</div>
    <div class="HTMLPanelErrorContent"> error </div>
    </div>
    </div>
    </body>
    </html>
    Products.js (adobe'S change to can load xml dataset)
    var mainPanel = null;
    // Our initialization function which unobtrusively attaches
    // click handlers on the product links within the page.
    function InitProductPage()
    mainPanel = new Spry.Widget.HTMLPanel("mainContent" , { evalScripts: true });
        var observer = {onPostUpdate: function(){ Spry.Data.initRegions('mainContent'); 
    mainPanel.addObserver(observer);
    // For every link on the page which points to a product page,
    // attach an onclick handler that will intercept clicks and
    // and fire off a request to load the URL via the HTMLPanel.
    // For these links, we want to load the static product page
    // and extract out the content underneath the "mainContent"
    // node.
    Spry.$$("#productPageLinks a").addEventListener("click", function(e)
      mainPanel.loadContent(this.href, { id: "mainContent" });
      return false;
    }, false);
    // For every link on the page which points to a product HTML
    // fragment, attach an onclick handler that will intercept clicks and
    // and fire off a request to load the URL via the HTMLPanel.
    // For these links, we are loading HTML fragments, so there is no
    // need to specify an ID to extract out. The HTMLPanel will insert
    // all of the content recieved.
    Spry.$$("#productFragmentLinks a").addEventListener("click", function(e)
      mainPanel.loadContent(this.href);
      return false;
    }, false);
    // Add our InitProductPage() function as a load listener
    // so that it gets executed once the page has fully loaded.
    Spry.Utils.addLoadListener(InitProductPage);
    XML data and stuff all loaded correctly
    What I am trying to do is to load a second page from a link in my initial page
    that contains a Tabbed Panel.
    The page loads but no panel functionality exists. The first Panel load correctly but behaves as a simple html page .
    I have searched several hours the forums and playing around by moving the definition of Spry.Widget.TabbedPanels within
    the initial HTMLPanel page and other spots but this  produced js errors as expected (because the tab panel definitions exist in bookcategories.php)
    which is loaded only when it is called.
    Any ideas?
    Page to load is like this :
    <bookcategories.php>
    <link rel="stylesheet" type="text/css" href="TabbedPanels/SpryTabbedPanels.css"/>
    <script src="TabbedPanels/SpryTabbedPanels.js"></script>
    <script language="JavaScript" type="text/javascript" src="../SpryAssets/SpryDataExtensions.js"></script>
    </head>
    <body >
    <div id="container">
    <div id="mainContent">
             <div class="TabbedPanels" id="TabbedPanels1">
      <ul class="TabbedPanelsTabGroup">
              <li class="TabbedPanelsTab">SOmething ... </li>
              <li class="TabbedPanelsTab">Something else </li>
    <
      </ul>
      <div class="TabbedPanelsContentGroup">
              <div class="TabbedPanelsContent">Blah Blah
                  <div spry:region="pv1" id="bibliapv"><br />
                    <br />
                  <div spry:state="ready">
                      <table width="775" height="42"  >
                        <tr style="color:#900"; >
    <th etc>
                        </tr>
                        <tr spry:repeat="pv1" spry:even="even" spry:odd="odd">
                          <td >       {ID_}
                         </td>
                          <td>{Writer}</td>
                          <td>{Book_Title}</td>
                           </tr>
                      </table>
                    </div>
                  </div>
              <div class="TabbedPanelsContent">Tab 2 Content</div>
    <div class="TabbedPanelsContent">Tab 3 Content</div>
       <div class="TabbedPanelsContent">Tab 4 Content</div>
      </div>
    </div>
    </div>
    <br class="clearfloat" />
    </div>
    <script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    </script>
    </body>
    </html>
    Many thanks

    Ok I went back through everything and checked to make sure my
    files were in the right places both my SpryTabbedPanels.css and my
    SpryTabbedPanels.js are in the SpryAssets folder and they work fine
    until I try and add data from an xml file to them then the tabs
    populate with the info but become unclickable and the content area
    has every bit of content in on tab. Below is what I have let me
    know what I'm doing wrong I am using Spry 1.6
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/xpath.js"
    type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <script src="SpryAssets/SpryTabbedPanels.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.XMLDataSet("solutions3.xml",
    "solutions/solution");
    //-->
    </script>
    <link href="SpryAssets/SpryTabbedPanels.css"
    rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div spry:region="ds1">
    <div id="TabbedPanels1" class="TabbedPanels">
    <ul class="TabbedPanelsTabGroup">
    <li spry:repeat="ds1" class="TabbedPanelsTab"
    tabindex="0">{name}</li>
    </ul>
    <div class="TabbedPanelsContentGroup">
    <div spry:repeat="ds1"
    class="TabbedPanelsContent">{desc}</div>
    </div>
    </div>
    </div>
    <script type="text/javascript">
    <!--
    var TabbedPanels1 = new
    Spry.Widget.TabbedPanels("TabbedPanels1");
    //-->
    </script>
    </body>
    </html>

  • Animated gif does not work in spry region

    Trying to display an animated gif while xml file is loading.
    The gif displays while loading but does not animate in the spry region.
    <div spry:region="dslistings">
    <div id="loadXML" spry:state= "loading"><img src="loadinganimated.gif"/></div>
    <div spry:state="ready" </div>
    Thank you in advance for any help.
    Jeff

    I believe you are correct, I tried to place the same animated gif outside of the spry region
    and it also did not animate until the xml (approximately 500 records) loaded and completed displaying.
    Once the xml loaded, the gif outside of the spry region started to animate.
    So how then could you display some sort of animated loading indication?
    Thank you
    jeff

  • 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

  • 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 ==--

  • Spry Data Set Issue

    Hello,
    I have written a page using a SpryData  set/Accordion structure. The XML feeds the name of the accordion tab and  its content. The idea is supposed to be that each topic has a potential  for 4 images. If there are fewer than four, no sweat, they just don't  show up. In Firefox 3.6.3 (Mac and PC), that is what happens. In Safari 4 (Mac and PC), latest Chrome for Mac and PC and in IE 8  any topic that has fewer than 4 images shows a missing image icon.
    I  don't want to resort to blank gifs and I hope that is not what is  needed. Below is some code. Just so you know, I am simultaneously using  tabbed panels and the accordion which is presented without the normal  accordion look-and-feel.
    ===header content===
    <script  src="../SpryAssets/SpryTabbedPanels.js"  type="text/javascript"></script>
    <script src="../SpryAssets/SpryAccordion.js"  type="text/javascript"></script>
    <script src="../SpryAssets/xpath.js"  type="text/javascript"></script>
    <script src="../SpryAssets/SpryData.js"  type="text/javascript"></script>
    <link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet"  type="text/css" />
    <link href="../SpryAssets/SpryAccordion.css" rel="stylesheet"  type="text/css" />
    <script type="text/javascript">
    <!--
    var dsAeroInterface = new Spry.Data.XMLDataSet("xml/aerointerface.xml",  "aero/topic[@name = 'New Desktop features']");
    <!--var dsAeroPics = new  Spry.Data.XMLDataSet("xml/aerointerface.xml",  "aero/topic/images/image");-->
    //-->
    </script>
    ===Accordion content===
    <div  id="acc_aero" spry:region="dsAeroInterface">
                           <div id="Acc1" class="Accordion"  tabindex="0">
                             <h5>{@name}</h5>
                             <div spry:repeat="dsAeroInterface"  class="AccordionPanel">
                               <div class="AccordionPanelTab">
                                 <h4>{item}</h4>
                               </div>
                               <div class="AccordionPanelContent">
                                 <div>
                                   <ul class="image_thumbs">
                                     <li><a href="{pic1/@path}"  rel="lightbox[a]" title="{pic1/@caption}"><img class="changeDim"   src="{pic1/@path}"/></a></li>
                                     <li><a href="{pic2/@path}"  rel="lightbox[a]" title="{pic2/@caption}"><img class="changeDim"   src="{pic2/@path}"/></a></li>
                                     <li><a href="{pic3/@path}"  rel="lightbox[a]" title="{pic3/@caption}"><img class="changeDim"   src="{pic3/@path}"/></a></li>
                                     <li><a href="{pic4/@path}"  rel="lightbox[a]" title="{pic4/@caption}"><img class="changeDim"   src="{pic4/@path}"/></a></li>
                                   </ul>
                                 </div>
                               </div>
                             </div>
                           </div>
    <script type="text/javascript"> var a1 = new  Spry.Widget.Accordion("Acc1", { useFixedPanelHeights: false,  defaultPanel: -1 }); </script>
    </div>
    Here  is the URL: http://academic.csuohio.edu/milhoan_g/windows7/_index2.html.
    I don't know if it's a Spry problem, a browser problem or an XML  problem, especially since there are lots of ways to organize the XML.
    Thanks  for your help.
    Bill

    g.milhoan wrote:
    I don't know if it's a Spry problem, a browser problem or an XML  problem, especially since there are lots of ways to organize the XML.
    Hello Bill,
    First of all, thank you for posting the URL of the site, this makes it easier for us to supply you with an answer.
    It is very rarely a Spry problem, it could be a browser idiosyncrasy, but usually it is the way that we have coded mark-up as in this case.
    Because there is no picture to show due to a link to a non-existing picture, FF places a blank, whereas other browsers, rightly so, place a broken link image where the picture is supposed to be.
    <ul class="image_thumbs">
      <li><a href="{pic1/@path}" rel="lightbox[a]" title="{pic1/@caption}"><img class="changeDim"  src="{pic1/@path}"/></a></li>
      <li><a href="{pic2/@path}" rel="lightbox[a]" title="{pic2/@caption}"><img class="changeDim"  src="{pic2/@path}"/></a></li>
      <li><a href="{pic3/@path}" rel="lightbox[a]" title="{pic3/@caption}"><img class="changeDim"  src="{pic3/@path}"/></a></li>
      <li><a href="{pic4/@path}" rel="lightbox[a]" title="{pic4/@caption}"><img class="changeDim"  src="{pic4/@path}"/></a></li>
    </ul>
    The solution to overcome this is to place a conditional statement in each of the above such as spry:if='{pic4/@path}' placed in the <LI>-tag. This will hide the the <LI>-tag if the condition is false.
    I hope this helps.
    Ben

  • SIFR & Spry regions

    I've used sIFR for h2 headings, in a page which uses the Spry
    Photo Gallery code - within which there is a h3 tag that draws from
    the xml file.
    The h3 tag doesn't show up when sIFR is used - although there
    are other xml elements in the page which still work ok.
    As I'm not using sIFR on the h3 tag, it's confusing the life
    out of me. Any help much appreciated.
    The page is
    here
    Thanks, Matt.

    include sIFR script above the SpryData.js
    and include the
    <script type="text/javascript">if(typeof sIFR ==
    "function"){
    sIFR.replaceElement("h2", named({sFlashSrc:
    "flash/communist.swf", sColor: "#FFFFFF", sBgColor: "#2F0000"}));
    </script>
    within your Spry:region so its gets rebuild everytime the
    region updates.
    maby that will help.

  • 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....

  • 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).          

Maybe you are looking for

  • AP Trial Balance Report Issue

    Hi gurus- I run the AP Trial Balance report and have an issue that I cannot reconcile with my raw data because when I export into excel, the invoice number is cut off after 20 characters.  This client has long invoice numbers.  Is there any way to ge

  • EDI:Sale order and delivery order

    hi friends 1.Our process is  customer send the PO Through B2B Server (third party system) my how i  get the notification throgh mail..what i do for configuration.....iam sure this is for inbound message ..is it require EDI Configuration or master dat

  • Calling a Web Service from Java

    Our java guru (who is out sick....AHHHH) created all the calls that are needed to access the web service that he has running. For example the call getLongList(String user, String password) will return a list of all outstanding transactions. He made a

  • Entering data in an HTML with an Applet?

    I have a small application I made with Swing. now, I want to make it html for use with Explorer. and I have 2 challanges: 1. How do I get use input in an Applet? (the example in the tutial only applies to showing text. 2. How do I access the database

  • Problems With Activation

    I purchased Adobe Audition 3.0 brand new in it's box, and when trying to activate the software it gives me the "Activation Server Unavailable" message. When I tried to activate it by phone, after I type in the serial numbers the automated system said