Spry Repeat/XML question

I am in desperate need of help.
Here is the path to my html file.
http://www.3hounddesign.com/WoodsWoods/gallery/index.html
When you look at it, you see the navigation list on the left
(Adobe, SF Symphony, Fiery, etc). This list corresponds to the
images that you see. However some of the navigation items (Adobe,
Apple, Levi Strauss) have more than one image associated with them.
I want to be able to use the arrows at the bottom of the page to
click through to the second image, but not have it show up on the
navigation list. For example, I only want Adobe to show up once on
the navigation list, even though I have 2 different adobe photos,
and thus have created 2 different XML entries for Adobe.
http://www.3hounddesign.com/WoodsWoods/gallery/galleries/woods/photos.xml
The first entry has the Adobe title, while I left the second
one blank. However this leaves a blank space on the navigation
list.
Unfortunately I know very little about javascript and am just
learning about this spry stuff and am very confused, and therefore
created this stuff by altering the adobe gallery demo
I also have a version I created by altering the adobe
products demo (
http://www.3hounddesign.com/Paul_Woods/identity.html#)
However that has problems of its own, so I would rather stick
with my alteration of the gallery demo.
So basically my question...Is there any way that I can have
the navigation only show one entry for Adobe (and Apple and Levi)
yet still have two images there?
Sadly, I am desperate need of an answer ASAP, as a current
job I am working on depends on it, and I don’t want to have
to resort to iframes.
Please please someone help me!

Hi,
I looked over you code and I noticed that you have the image
src added on the left side.
You have this <img
src="galleries/{dsGalleries::@base}{dsGallery::thumbnail/@base}{@thumbpath}"
alt="{@thumbpath}" name="tn{ds_RowID}" width="89" height="15"
id="tn{ds_RowID}" style="left: -77px; right: 0px;" />
You don't need to have the image added on the left side,
because you want there only the title (Adobe, SF Symphony...)
So you should replace the img with a div for example:
<div style="width:89px; height:15px;left: -77px; right:
0px;" id="tn{ds_RowID}" >{@thumbpath}</div>
The reason why you have an empty space after Adobe item is
that on you xml you have an empty alt attribute.
To display only the thumbpaths that are not empty you can add
an spry:if condition.
So the above div becomes:
<div style="width:89px; height:15px;left: -77px; right:
0px;" id="tn{ds_RowID}" spry:if="{@thumbpath}" != ""
>{@thumbpath}</div>
This says if thumbpath is not empty display it.
I aslo load you page in IE and I noticed that the left menu
is not displayed.
Diana

Similar Messages

  • Help with Spry Rating Widget within a Spry Repeating Region

    My link  http://www.youthinkyougotitbad.com
    This is a long question, but it seems to me if answered somewhere it could help alot of people in the spry community creating comment boards as it uses three important spry widgets: rating, repeating, and tabbed panels. I am trying to use spry rating widget within a spry repeating region within a spry tabbed panel with xml. I was trying to go with the pulse light script (http://forums.adobe.com/message/3831721#3831721) but Gramps told me about the spry rating widget. But I have ran into a couple more problems. First, I couldnt find that much information on the forums or online about how to do the php page with the spry rating widget. None of these have any information on how to do it:
    http://labs.adobe.com/technologies/spry/articles/rating_overview/index .html
    http://labs.adobe.com/technologies/spry/articles/data_api/apis/rating. html
    http://labs.adobe.com/technologies/spry/samples/rating/RatingSample.ht ml
    And it seems that the official examples are so poor (or I am just ignorant, which def could be a possiblity) it shows
    to set the initial rating value from the server, but uses a static value of 4
    http://labs.adobe.com/technologies/spry/samples/rating/RatingSample.html
    <span id="initialValue_dynamic" class="ratingContainer">
             <span class="ratingButton"></span>
             <span class="ratingButton"></span>
             <span class="ratingButton"></span>
             <span class="ratingButton"></span>
             <span class="ratingButton"></span>      
             <input id="spryrating1_val" type="text" name="spryrating1" value="4" readonly="readonly" />
             <span class="ratingRatedMsg sample">Thanks for your rating!</span>
    </span>
    <script>
    var initialValue_dynamic = new Spry.Widget.Rating("initialValue_dynamic", {ratingValueElement:'spryrating1_val'});
    </script>
    I finally found a site that has the php and mysql setup.
    http://www.pixelplant.ro/en/articles/article-detail/article/adobe-widgets-for-download.htm l
    But its not perfect. It has the same problem that I ran into with Pulse light, that you had to use php echo within the spry repeating region to set the initial value from the server:
    <span id="spryrating1" class="ratingContainer">
             <span class="ratingButton"></span>
                <input type="text" id="ratingValue" name="dynamic_rate" value="<?php echo $row['average']?>"/>
            </span>
            <script type="text/javascript"
                var rating1 = new Spry.Widget.Rating("spryrating1", {ratingValueElement:'ratingValue', afterRating:'serverValue', saveUrl: 'save.php?id=spryrating1&val=@@ratingValue@@'});
            </script>
    So instead, I tried with three of my panels (www.youthinkyougotitbad.com) to get the average rating from xml by using the following queries:
    Recent
    Returns the blurts in most recent order along with average rating
    SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt,Blurt.`Date`,DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date, ratings.rating_id, Avg(ratings.rating_value) as average_r FROM ratings Left Join Blurt On ratings.rating_id = Blurt.Id_blurt Group By Id_blurt ORDER BY Blurt.`Date` DESC
    Wet Eyed
    Returns the blurts in highest ratings order along with the average rating
    SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt, DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date, ratings.rating_id, Avg(ratings.rating_value) as average_r FROM ratings Left Join Blurt On ratings.rating_id = Blurt.Id_blurt AND ratings.rating_value > 0.1 Group By Id_blurt ORDER BY average_r Desc
    Dry Eyed
    Returns the blurts in lowest rating order along with the average rating
    SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt, DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date, ratings.rating_id, Avg(ratings.rating_value) as average_r FROM ratings Left Join Blurt On ratings.rating_id = Blurt.Id_blurt AND ratings.rating_value > 0.1 Group By Id_blurt ORDER BY average_r
    These all return the correct xml in the correct order.And they return the average rating of each blurt which I can send to my page with xml.
    My first question is that I dont know how to configure the query on my fourth panel Empathized & Advised the same way because it already has a Group By for the Comment Id.
    SELECT `Comment`.id_Blurt, COUNT(*) as frequency, Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt, DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date FROM Blurt, `Comment` WHERE Blurt.Id_blurt = `Comment`.id_Blurt GROUP BY `Comment`.id_Blurt ORDER BY COUNT(*) DESC";
    Not sure if you guys need more information to understand that all, if so just ask.
    So after I get my average value through xml to the first three panels, I set my spry repeating region up like this:
    (Blurt panel)
    <div spry:region="pv1" spry:repeatchildren="pv1">           
               <div class="blurtbox">
                <!--  most recent blurt tab-->
                <h3> "{pv1::Blurt}"</h3>
                <p> Blurted from {pv1::Location} at {pv1::Date}</p>
                <p>Empathize or Advise about {pv1::Name}'s Blurt #<a href="detailblurt.php?blurtid={pv1::Id_blurt}"> {pv1::Id_blurt}</a></a></p>
               <span id="{pv1::Id_blurt}" class="ratingContainer">
                <span class="ratingButton"></span>
                <span class="ratingButton"></span>
                <span class="ratingButton"></span>
                <span class="ratingButton"></span>
                <span class="ratingButton"></span>
                <span class="ratingRatedMsg">Thank You! Your tears have been tallied.</span>
                <input type="text" id="ratingValue" name="dynamic_rate" value="{pv1::average_r}"/>
            </span>
            <script type="text/javascript">
                // overview of available options and their values:
                // http://labs.adobe.com/technologies/spry/articles/rating_overview/index.html
                var rating1 = new Spry.Widget.Rating("{pv1::Id_blurt}", {ratingValueElement:'ratingValue', afterRating:'serverValue', saveUrl: 'save.php?id={pv1::Id_blurt}&val=@@ratingValue@@'});
            </script>
                 <br/>
               </div>
              </div>
    Ok, it registers the right vote in the database with the right blurt id each time. But I am having two problems so far:
    One, even though {pv1::average_r} returns the correct average through xml, it doesn't show the initial rating value for each of the repeating blurts. It seems to show the first one correct, and then just repeat that same value to the other ones that follow. I just dont understand since it can get the correct server value right after you vote (afterRating:'serverValue), that I can't manipulate spryrating.js in some way that I could just replace 'ratingValue' in ratingValueElement:'ratingValue' with something to give me the initial server value.
    Two: Is even more mysterious to me, if you play around with voting on the site, sometimes you are unable to vote on different blurts. Its weird. It seems like that the javascript is completely off just on those blurts. And sometimes its a whole row, sometimes none. But so far its never a problem on the first tabbed panel (Recent), only on the other three. As far as I know, the coding is exactly the same in each tab's repeating region except for the different xml input.
    And, now on the live server, sometimes the pics of tears used to voting dont show up until you click.
    Any help on those three questions (how to query the fourth panel, how to show the initial server value, and the glitches with voting) would be greatly appreciated!! I looked pretty hard on adobe forums and other sites, and didnt see much on how to really use the spry rating widget with php and xml.
    Thanks!!

    Update:
    Ok, the first query on the Recent tab doesnt work for me because it wont show unless its already voted, and since these are supposed to be new blurts, that kind of breaks the whole site:
    "SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt,Blurt.`Date`,DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date, ratings.rating_id, Avg(ratings.rating_value) as average_r FROM ratings Left Join Blurt On ratings.rating_id = Blurt.Id_blurt Group By Id_blurt ORDER BY Blurt.`Date` DESC";
    So I replaced it with what I originally had.
    "SELECT Blurt.Id_blurt, Blurt.Name, Blurt.Location, Blurt.Blurt,Blurt.`Date`,DATE_FORMAT(Blurt.`Date`, '%l:%i %p on %M %D, %Y') as Date FROM Blurt ORDER BY Blurt.`Date` DESC";
    But this doesn't provide me with the initial average rating:(

  • Spry Repeat List does not appear in Google Chrome 28

    Spry repeat list works in IE8 and Firefox 22.  However in Google Chrome 28 no data appears (data is blank).  This is the code:
    <div>
                  <p><span class="headline">events</span></p>
                  <div spry:region="Events">
                    <dl spry:repeatchildren="Events">
                      <dt>{date}</dt>
                      <dd>{title}</dd>
            </dl>
          </div>
                  <p> </p>
                  <p><span class="headline"><br />
                  </span></p>
                </div>
    This is what appears in IE8 and Firefox:
    events
    May 10,2012
    Pre-Memorial Day Sale
    May 28, 2012
    Big Memorial Day Sale
    May 31, 2012
    Big After-Memorial Day Sale

    This is the code:
    <!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>OrganicUtopia Home Page</title>
        <style type="text/css">
        </style>
        <link href="styles.css" rel="stylesheet" type="text/css" />
              <style type="text/css">
              .headline {          color: #88B036;
              font-weight: bold;
              font-size: 18px;
              margin-bottom: -2px;
        </style>
              <link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
              <link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
              <link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
              <script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
              <script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
              <script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
              <script src="SpryAssets/xpath.js" type="text/javascript"></script>
              <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
              <script type="text/javascript">
    var Events = new Spry.Data.XMLDataSet("data/events.xml", "calendar/event");
        </script>
              </head>
    <body>
    <div id="container">
      <div id="GlobalNav">Site Map | Login</div>
      <div id="header"><img src="images/ou_logo.gif" width="210" height="41" /></div>
      <div id="nav">{Menu Bar Here}</div>
      <div id="main">
        <p class="headline">welcome to organic utopia </p>
        <p> </p>
        <div id="TabbedPanels1" class="TabbedPanels">
          <ul class="TabbedPanelsTabGroup">
            <li class="TabbedPanelsTab" tabindex="0">What's New</li>
            <li class="TabbedPanelsTab" tabindex="0">Features</li>
            <li class="TabbedPanelsTab" tabindex="0">Customer Testimonials</li>
    </ul>
          <div class="TabbedPanelsContentGroup">
            <div class="TabbedPanelsContent">
              <p><span class="headline">Shop in the green! </span></p>
              <p><img src="images/recycle_bag.gif" alt="Recycle Bag" width="81" height="101" hspace="10" vspace="5" align="left" />We have added recyclable shopping bags, which eliminate the need for the age-old question &quot;paper or plastic?&quot;. These bags are tough, stylish, and eco-friendly! Pick from 2 sizes with the OU logo!</p>
              <p></p>
            </div>
            <div class="TabbedPanelsContent">
              <p><span class="headline">Featured stuff! </span></p>
              <p><img src="images/couch.gif" alt="Couch" width="107" height="73" hspace="5" vspace="5" align="left" />A whole new line of green living products has just hit the shelves! Try our new recyclable office furniture - imagine a couch that dissolves on its own back into Mother Earth! We also have a whole new line of natural cosmetics made from the finest ingredients that are gentle on your skin!</p>
            </div>
            <div class="TabbedPanelsContent">
              <p><span class="headline">Our loyal customers...</span></p>
              <p>&quot;organic Utopia is the place to shop - i wouldn't buy my stuff anywhere else...EVER!&quot; <br />
                - Jeff A., Boston, MA</p>
              <p>&quot;The best place for healthy, organic and green living..everything from food to furniture, all in one place!&quot; -  Fred G., Long Beach, NY </p>
            </div>
    </div>
        </div>
        <p> </p>
        <p> </p>
        <p> </p>
        <h1 > </h1>
      </div>
      <div id="sidebar">
    <div>
      <div id="Accordion1" class="Accordion" tabindex="0">
        <div class="AccordionPanel">
          <div class="AccordionPanelTab">Food Products</div>
          <div class="AccordionPanelContent">Dried Fruits &amp; Vegetables<br />
    Snacks<br />
    Beverages<br />
    Heat and Serve<br />
    Cereals</div>
        </div>
        <div class="AccordionPanel">
          <div class="AccordionPanelTab">Clothing</div>
          <div class="AccordionPanelContent">Bags<br />
    Accessories<br />
    Shoes<br />
    Fake Leather Goods</div>
        </div>
        <div class="AccordionPanel">
          <div class="AccordionPanelTab">Home Products</div>
          <div class="AccordionPanelContent">Candles<br />
    Pillows<br />
    Storage<br />
    Knick Knacks</div>
        </div>
    <div class="AccordionPanel">
      <div class="AccordionPanelTab">Lifestyle</div>
          <div class="AccordionPanelContent">Music &amp; DVDs<br />
    Decorations &amp; Wall Hangings</div>
      </div>
      </div>
    </div>
                <div>
              <p><span class="headline">events</span></p>
              <div spry:region="Events">
                <dl spry:repeatchildren="Events">
                  <dt>{date}</dt>
                  <dd>{title}</dd>
                </dl>
              </div>
              <p> </p>
              <p><span class="headline"><br />
                </span></p>
            </div>
            <div>
              <div id="CollapsiblePanel1" class="CollapsiblePanel">
                <div class="CollapsiblePanelTab" tabindex="0">Contact Us</div>
                <div class="CollapsiblePanelContent">Enter your email address to receive specials, event notifications and more!<br />
                  <label>
                    <input name="emailaddr" type="text" id="emailaddr" size="20" />
                    <br />
                    <input type="submit" name="button" id="button" value="Submit" />
                  </label>
                </span></div>
              </div>
            </div>
            <div></div>
          </div>
          <div id="footer">All content copyright of OrganicUtopia</div>
        </div>
        <script type="text/javascript">
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false});
    </script>
    </body>
    </html>

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

  • Problem with Spry:Repeat and Slide Effect on IE6

    I run the website for my kids' hockey association and I'm not
    a web programmer. I am trying to display events in a Spry region
    using spry:repeat. The data is coming from a Google Calendar . I
    display the event date and title on the main page. I have the
    onclick set to call a javascript function that exposes the details
    using the spry slide effect. It works ok except in IE6.
    The following creates my dataset from a method call to a
    Coldfusion component that returns the XML I need:
    <script type="text/javascript">
    var ds1 = new Spry.Data.XMLDataSet("
    http://tornadoyouthhockey.org/Events.cfc?method=EventXML",
    "events/event",{distinctOnLoad:false});
    </script>
    The following function slides open the detail:
    <script type="text/javascript">
    function startBlind(rid) {
    var contentdiv = document.getElementById('panel'+ rid
    +'Content');
    var panel_height = contentdiv.clientHeight;
    if (panel_height<100){
    var bd = new Spry.Effect.Blind('panel'+ rid +'Content',
    {duration: 800, to: '100px', toggle: true});
    else {
    var bd = new Spry.Effect.Blind('panel'+ rid +'Content',
    {duration: 800, to: '0px', toggle: true});
    bd.start();
    </script>
    Within the repeat I have:
    <div class="EventPanelLabel"
    onclick="startBlind({ds_RowID});">{startDate} &mdash;
    {title}</div>
    I think the XML looks OK but for some reason when the page
    loads, IE6 returns:
    Exception caught while loading
    http://tornadoyouthhockey.org/Events.cfc?method=EventXML:
    [object Error]
    The page seems to work fine in Safari and Firefox on the Mac
    and IE7 as well as Firefox on Windows. Just IE6 seems to be having
    the problem. Could you please take a look at
    http://tornadoyouthhockey.org
    and provide any suggestions you may have?
    Also, is there a way to hide the {startDate} - {title} I'm
    seeing while the page loads?
    Thanks,
    Kevin

    Kin:
    Thanks for your reply. I made the changes you suggested but,
    unfortunately, IE6 is still giving me the same error when the page
    loads:
    Exception caught while loading
    http://tornadoyouthhockey.org/Events.cfc?method=EventXML:
    [object Error]
    Could this be part of the problem an need to be changed as
    well? :
    <div id="panel{ds_RowID}Content"
    Any other ideas? The page is live if you'd care to look...
    http://tornadoyouthhockey.org
    Kevin

  • Work around for spry:repeat="ds1 ds2" limitation

    I need to have both data sets repeat when using a Spry repeating region:
    <div id="apDiv4" spry:region="ds1 ds2">
        <table class="sprytable" border="1">
          <tr>
            <th spry:sort="Q#">Q#</th>
            <th spry:sort="Category">Category</th>
            <th spry:sort="Question">Question</th>
            <th spry:sort="You">You</th>
          </tr>
          <tr spry:repeat="ds1 ds2">
            <td>{ds1::Q#}</td>
            <td>{ds1::Category}</td>
            <td>{ds1::Question}</td>
            <td>{ds2::You}</td>
          </tr>
        </table>
    </div>
    If I use ds1 in the spry:repeat, ds1 data will repeat (but ds2 will use the first value); or if I specify ds2, ds1 will use the first value.
    I need them both to repeat.
    I have spent so much time in forums, etc. and can't seem to find a workaround.
    My only work around is to combine ds1 and ds2 and reload them together from the server - yuk!
    ds1 is fixed and large. ds2 is small and dynamic so reloading really sucks.
    Following are the ds Vars - probably irrelevent:
    var ds1 = new Spry.Data.HTMLDataSet(null, "rsfamily", {sortOnLoad: "Q#", sortOrderOnLoad: "ascending" }); ds1.setColumnType("Q#", "number"); var ds2 = new Spry.Data.HTMLDataSet("youranswersIRtab.php", "youranswerstab", {}); I will worship the person who gives me an idea.
    Thanks

    Thanks V1, timkho and coolsanwa for your thoughts.  Since you've been so patient (and understanding) let me briefly tell you what I'm trying to do.
    I'm considered good at multi-dimensional databases and have recently fallen in love with DreamWeaver to build a pretty complex site so I don't have to be a real expert at PHP, Spry, Ajax, JavaScript, DOM, HTML, CSS etc (I suck, but most everything is working).
    I wish I could point you to a site but I need to keep it secret for a bit - its strictly on my PC for now.
    Let me explain the snippit, which I still don't have working .
    ds1 has three columns and ds2 has one.
    ds1          ds1               ds1                         ds2               ds3
    Q#          Category         Question                 You               Compare1
    1          Boats               How big?                    24               36
    2          Boats               What color?               Blue               Red
    3          House               Number rooms?          3                    6
    4          House               Sq feet?                    1000               3000
    5          House               Have garage?               No               Yes
    etc to 200+
    ds1 doesn't change and I don't want to reload it
    ds2 are your saved answers (I will have a form to fill in and a Submit-  different subject)
    ds3 is user selected comparisons, retrieved from a MD database (academic because ds2 has me stopped).
    Category has table row classes (to whole row), which will drive Tabbed Panels.
    ds1, ds2, ds3 data have the class assigned to each row (setRowSelector) classes for columns(setColumnSelector).
    I want a Spry Table with its many neat features (eg. sorting) that combines the 3 ds's (lets worry about 2 for now).
    Incredibly simple but I'm stuck.
    Timko suggestion results in syntax error- removing single quotes.
    Collsanwa suggestion creates new columns so repeat is done for each row after You column:
    24,Blue,3,1000,No
    24,Blue,3,1000,No
    24,Blue,3,1000,No
    24,Blue,3,1000,No
    24,Blue,3,1000,No
    24,Blue,3,1000,No
    200+ times
    (I'll repeat the snippit) . Could you point me to an explanation for the spry:if  id/mmid
    Thanks so much.
    <div id="apDiv4" spry:region="ds1 ds2">
        <table class="sprytable" border="1">
          <tr>
            <th spry:sort="Q#">Q#</th>
            <th spry:sort="Category">Category</th>
            <th spry:sort="Question">Question</th>
            <th spry:sort="You">You</th>
          </tr>
          <tr spry:repeat="ds1">
            <td>{ds1::Q#}</td>
            <td>{ds1::Category}</td>
            <td>{ds1::Question}</td>
            <td spry:repeat="ds2" spry:if="'{ds1::id}' == '{ds2::mmid}'">{ds2::You}</td>
    <!--    <td spry:repeat="ds2" spry:if="{ds1::id} == {ds2::mmid}">{ds2::You}</td>   Syntax error w/o quote-->
          </tr>
        </table>
    </div>

  • Spry:repeat works in Mozilla and not IE 6

    I made this little test in Spry.
    It happens to work in Mozilla but not in Internet Explorer 6
    which is quite weird since I almost copy/pasted from one of the
    included examples (the example worked fine everywhere).
    Can anyone point me in the right direction please?
    Thanks...
    <!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>
    <title>Club voleibol bargas</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <script language="JavaScript" type="text/javascript"
    src="scripts/spry/xpath.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="scripts/spry/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript">
    var dsNews = new
    Spry.Data.XMLDataSet("scripts/xml_noticias.php", "/allnews/news");
    </script>
    </head>
    <body>
    <div spry:region="dsNews">
    <div spry:repeat="dsNews">{header}</div>
    </div>
    </body>
    </html>
    The XML needed for this looks like this:
    <allnews>
    <news>
    <id>26</id>
    <header>Morbi mauris.</header>
    </news>
    <news>
    <id>23</id>
    <header>Lorem ipsum dolor sit amet</header>
    </news>
    <news>
    <id>8</id>
    <header>Proin convallis. Duis sed est ut ligula
    ullamcorper bibendum.</header>
    </news>
    </allnews>

    I spent days trying to figure it out and the minute I post it
    here the solution comes to me!
    The problem was that the XML file was being generated by a
    PHP script which was not outputting the appropriate headers.
    You can use:
    header('Content-Type: text/xml');
    Or use this other one if your charset is NOT US-ASCII:
    header('Content-Type: application/xml');

  • Help With Spry Repeat Regions

    Hello everyone,
    I've recently started using Spry for a project I've been
    asked to work on and I've run in to a few issues since my spec
    changed on me today. So any help or advice anyone has is very much
    welcome as I'm very much out my comfort zone at the moment.
    Original Spec
    The idea originally was to have a drop down of roles which
    was created from the role tag within a xml file which I was able to
    do as you can see below in the attached code. Once the user had
    picked a role it would then
    ds2.setCurrentRowNumber(this.selectedIndex) and this would trigger
    the spry detail region I have to populate the fields I setup to get
    out of the xml the role, process and info.
    At the time I was told a role would only appear once in the
    file but this is now not the case :(
    My problem / New Spec
    Unfortunately with the xml now having a role more then once
    I've been asked to include a dynamic region which will display the
    process and info fields from other records which have this role
    name. Which is the bit I'm having problems with. I've been playing
    with creating a spry:repeat for each field and then using
    Spry:if="'{Role}'.search(^/myVar/) != -1; but I've had no luck
    getting a value into a variable and I'm lack of experience is
    running out of ideas.
    Hope I've made sense this is my first time using spry and
    JavaScript, so any help is greatly welcome.
    Thanks Nick.
    Example of the XML file - Please note this is very much a cut
    down version.

    tried changing the Region HTML table cell attributes to width:75pct, but this has no effect.Unsurprisingly. Use a valid CSS length specification.

  • Multi-level nested tables for repeatable XML Elements

    Hi there,
    Suppose we have a XML Schema „ASchema“ like this (XMLDB schema annotations are left out for simplicity):
    <xs:schema xmlns:xs=" .... " />
    <xs:element name=“A“>
         <xs:complexType>
              <xs:sequence>
                   <xs:element name=“B“ maxOccurs=“unbounded“/>
                        <xs:complexType>
                             <xs:sequence>
                                  <xs:element name = “C“ maxOccurs=“unbounded“/>
                             </xs:sequence>
                        </xs:complexType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
    </xs:element>
    </xs:schema>
    After registering this schema in Oracle, I can define a table like this:
    CREATE TABLE ATable
    id NUMBER,
    doc XMLTYPE
    XMLTYPE COLUMN doc
    XMLSCHEMA “ASchema“ ELEMENT “A“
    VARARRAY doc.“XMLDATA“.“B“ STORE AS TABLE “BTable“
    ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
    This creates a nested table "BTable" within the table "ATable". So far so good, I can use this nested table to gain faster access on every possible subelement of Element B when I set an appropriate index.
    I now want to create another nested table for element “C“ like this:
    DROP TABLE ATable;
    CREATE TABLE ATable
    id NUMBER,
    doc XMLTYPE
    XMLTYPE COLUMN doc
    XMLSCHEMA “ASchema“ ELEMENT “A“
    VARARRAY doc.“XMLDATA“.“B“ STORE AS TABLE “BTable“
    ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
    VARARRAY doc.“XMLDATA“.“B“.“C“ STORE AS TABLE “CTable“
    ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
    But this statement fails with the error message something like „ ... no such attribute ... „
    And here's my question: is it possible to create nested tables for repeatable XML Elements that are subelements of other repeatable XML Elements ? And if so, how can I do it ?
    Thank you very much in advance
    Jan

    Found a (partial) solution myself:
    If you add the attribute xdb:storeVarrayAsTable="true" to the root element of the XML schema, Oracle XMLDB generates nested tables for all repeatable XML Elements while registering the XML schema.
    Unfortunately, the names of these nested tables are system-generated, hence it's a bit uncomfortable to set indices on them. You can find out the names of these nested tables as follows:
    select table_name, parent_table_name, parent_table_column from user_nested_tables;
    Further information on that subject is supplied in the following thread:
    Re: default tables for elements with maxoccurs > 1
    It would be nice if there was a way to name the generated nested tables via appropriate XMLDB schema annotations.
    regards
    Jan

  • Diferent spry:repeat over a accordion widget

    Hello, I am trying to populate a accordion with a xml.
    my xml schema is:
    <?xml version="1.0" encoding="UTF-8" ?>
    <root>
    <canal nom="Últimos vídeos visitados">
    <item id="968">
    <title>Barredora Inalambrica</title>
    <text>Pensando en usted y su comodidad le ofrecemos
    ...</text>
    <video>videos/Hogar-3-BarredoraInalambrica.flv</video>
    <thumb>videos/thumbs/hogar3_thumb.jpg</thumb>
    <img>videos/thumbs/hogar3.jpg</img>
    </item>
    <item id="1000">
    <title>Wonder Max</title>
    <text>Preparar una fantástica comida, nunca
    había sido ...</text>
    <video>videos/Hogar-4-WonderMax.flv</video>
    <thumb>videos/thumbs/hogar4_thumb.jpg</thumb>
    <img>videos/thumbs/hogar4.jpg</img>
    </item>
    <item id="1001">
    <title>Chef-O-Matic</title>
    <text>¿No tienes tiempo para cocinar?
    </text>
    <video>videos/Hogar-5-Chef-O-Matic.flv</video>
    <thumb>videos/thumbs/hogar5_thumb.jpg</thumb>
    <img>videos/thumbs/hogar5.jpg</img>
    </item>
    </canal>
    <canal nom="Viajes">
    <item id="968">
    <title>Barredora Inalambrica</title>
    <text>Pensando en usted y su comodidad le ofrecemos
    ...</text>
    <video>videos/Hogar-3-BarredoraInalambrica.flv</video>
    <thumb>videos/thumbs/hogar3_thumb.jpg</thumb>
    <img>videos/thumbs/hogar3.jpg</img>
    </item>
    <item id="1000">
    my code is:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Untitled Document</title>
    <script src="includes/SpryAccordion.js"
    type="text/javascript"></script>
    <script src="includes/xpath.js"
    type="text/javascript"></script>
    <script src="includes/SpryData.js"
    type="text/javascript"></script>
    <link href="css/SpryAccordion.css" rel="stylesheet"
    type="text/css" />
    </head>
    <body>
    <div spry:region="channels items">
    <div class="Accordion" id="sampleAccordion"
    tabindex="0">
    <div class="AccordionPanel" spry:repeat="channels">
    <div class="AccordionPanelTab" >{@nom}</div>
    <div class="AccordionPanelContent">
    <div spry:repeat="items">
    <li>{title}</li>
    <li>{text}</li>
    </div>
    </div>
    </div>
    </div>
    <script language="JavaScript" type="text/javascript">
    var channels = new Spry.Data.XMLDataSet("data/channels.xml",
    "root/canal", {distinctOnLoad: true});
    var items = new Spry.Data.XMLDataSet("data/channels.xml",
    "root/canal/item", {distinctOnLoad: true});
    var sampleAccordion = new
    Spry.Widget.Accordion("sampleAccordion");
    </script>
    </body>
    </html>
    I don't know how I can insert the item tags inside de
    AccordionTabContent. I want to insert in the AccordionTabContent
    each item tag of each channel, but If I do a repeat over channels
    dataSet I can't extract the item information and If I try to repeat
    over items dataset, I can't extract the canal tag information to
    make the AccordionPanelTab.
    Do you know how can I do it?
    Thanks in advance

    I solve this problem today,,..is very vell documented...
    When you repeat acordion or tab or other wiget, you need have
    in repeat div also constructor of that object..
    Try this code...look at last div..
    change your include paths.
    my work code :
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>test</title>
    <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>
    <script type="text/javascript">
    var channels = new Spry.Data.XMLDataSet("xml.xml",
    "root/canal", {distinctOnLoad: true});
    var items = new Spry.Data.XMLDataSet("xml.xml",
    "root/canal/item", {distinctOnLoad: true});
    </script>
    <link href="SpryAssets/SpryAccordion.css" rel="stylesheet"
    type="text/css" />
    </head>
    <body>
    <div spry:region="channels items">
    <div class="Accordion" id="sampleAccordion"
    tabindex="0">
    <div class="AccordionPanel" spry:repeat="channels">
    <div
    class="AccordionPanelTab">{channels::@nom}</div>
    <div class="AccordionPanelContent">
    <div spry:repeat="items">
    <li>{items::title}</li>
    <li>{items::text}</li>
    </div>
    </div>
    </div>
    </div>
    <script language="JavaScript" type="text/javascript">
    var sampleAccordion = new
    Spry.Widget.Accordion("sampleAccordion");
    </script>
    </div>
    </body>
    </html>
    My xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <root>
    <canal nom="Últimos vídeos visitados">
    <item id="968">
    <title>Barredora Inalambrica</title>
    <text>Pensando en usted y su comodidad le ofrecemos
    ...</text>
    <video>videos/Hogar-3-BarredoraInalambrica.flv</video>
    <thumb>videos/thumbs/hogar3_thumb.jpg</thumb>
    <img>videos/thumbs/hogar3.jpg</img>
    </item>
    <item id="1000">
    <title>Wonder Max</title>
    <text>Preparar una fantástica comida, nunca
    había sido ...</text>
    <video>videos/Hogar-4-WonderMax.flv</video>
    <thumb>videos/thumbs/hogar4_thumb.jpg</thumb>
    <img>videos/thumbs/hogar4.jpg</img>
    </item>
    <item id="1001">
    <title>Chef-O-Matic</title>
    <text>¿No tienes tiempo para cocinar?
    </text>
    <video>videos/Hogar-5-Chef-O-Matic.flv</video>
    <thumb>videos/thumbs/hogar5_thumb.jpg</thumb>
    <img>videos/thumbs/hogar5.jpg</img>
    </item>
    </canal>
    <canal nom="Viajes">
    <item id="968">
    <title>Barredora Inalambrica</title>
    <text>Pensando en usted y su comodidad le ofrecemos
    ...</text>
    <video>videos/Hogar-3-BarredoraInalambrica.flv</video>
    <thumb>videos/thumbs/hogar3_thumb.jpg</thumb>
    <img>videos/thumbs/hogar3.jpg</img>
    </item>
    </canal>
    </root>
    Dont remember repeat constructor using last </div> :)
    bye
    Spry V.1.6

  • Spry:repeat Help

    Help. I am new to Spry (although been doing JS for years) and
    am attempting to get a handle on it. Here is my issue. I am
    attempting a simple spry:repeat and all I am getting is my last
    node.
    Here is the XML chunk:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <newHire>
    <quickStart>
    <quickLink linkUrl="#">Accessing Activant systems and
    launching the VPN</quickLink>
    <quickLink linkUrl="#">Navigating the Employee
    Intranet</quickLink>
    <quickLink linkUrl="#">Using the Employee Training
    Portal</quickLink>
    <quickLink linkUrl="#">Using CEP</quickLink>
    </quickStart>
    </newHire>
    HTML...
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xmlns:spry="
    http://ns.adobe.com/spry">
    <head>
    <title>Spry Test</title>
    <script src="includes/xpath.js"
    type="text/javascript"></script>
    <script src="includes/SpryData.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    // STEP 1: Create a data set.
    var dsNewHireQuickStart = new
    Spry.Data.XMLDataSet("newHire.xml", "newHire/quickStart");
    //-->
    </script>
    </head>
    <body>
    <div id="quickLinks" spry:region="dsNewHireQuickStart">
    <ul>
    <li
    spry:repeat="dsNewHireQuickStart">{quickLink}</li>
    </ul>
    </div>
    </body>
    </html>
    Thoughts?
    ~Clay

    Hi,
    change your xml structure so that each quickLink tag is
    wrapped in a quickStart tag, like this:
    ====================== new xml =================
    <?xml version="1.0" encoding="iso-8859-1"?>
    <newHire>
    <quickStart>
    <quickLink linkUrl="#">Accessing Activant systems and
    launching the VPN</quickLink>
    </quickStart>
    <quickStart>
    <quickLink linkUrl="#">Navigating the Employee
    Intranet</quickLink>
    </quickStart>
    <quickStart>
    <quickLink linkUrl="#">Using the Employee Training
    Portal</quickLink>
    </quickStart>
    <quickStart>
    <quickLink linkUrl="#">Using CEP</quickLink>
    </quickStart>
    </newHire>

  • Spry Repeat Accordeon Panels

    This code here repeats the accordeons panel but all opened
    and innactive.
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Products Demo</title>
    <link href="css/accordion.css" rel="stylesheet"
    type="text/css" />
    <script type="text/javascript"
    src="../../includes/xpath.js"></script>
    <script type="text/javascript"
    src="../../includes/SpryData.js"></script>
    <script type="text/javascript"
    src="../includes/SpryEffects.js"></script>
    <script type="text/javascript"
    src="../includes/SpryAccordion.js"></script>
    <script type="text/javascript"
    src="../../includes/gallery.js"></script>
    <script type="text/javascript">
    var dsProducts = new Spry.Data.XMLDataSet("products.xml",
    "products/product")
    var dsProductFeatures = new
    Spry.Data.XMLDataSet("products.xml",
    "products/product/features/feature")
    </script>
    <link href="../css/screen.css" rel="stylesheet"
    type="text/css" />
    </head>
    <body>
    <div id="wrap">
    <div id="sidebar">
    <table spryregion="dsProductFeatures" id="products">
    <caption>
    {@Departure}
    </caption>
    </table>
    <div spryregion="dsProductFeatures" id="content">
    tetette
    <p>
    <img src="
    http://staticcontent.exitravel.com/StaticContent/EN/DBImages/Common/Image/Hotel/{@OrgID}/{ @HotelID}_1.jpg"
    id="mainImage" alt="main image" width="120" height="120" />
    </div>
    <div id="Acc1" class="Accordion">
    <div spryregion="dsProductFeatures"
    class="AccordionPanel">
    <div spryrepeat="dsProductFeatures">
    <div class="AccordionPanelLabel">
    {@Destination}
    </div>
    <div class="AccordionPanelContent">
    {@Price}
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    <script type="text/javascript">
    <!--
    var Acc1 = new Spry.Widget.Accordion("Acc1");
    -->
    </script>
    </body>
    </html>
    Does that mean that Spry accordeons cant be duplicated that
    way?

    Actually, you can generate the panels dynamically, but there
    are a couple of things you have to keep in mind. There is an
    expected markup structure for the accordion. The divs that make up
    the accordion follow a pattern that looks like this:
    Accordion
    Accordion Panel
    Accordion Panel Label
    Accordion Panel Content
    Accordion Panel
    Accordion Panel Label
    Accordion Panel Content
    Inserting extra divs between and around some of these
    structures will only confuse the Accordion behavior code.
    Since you are trying to repeat accordion panels, you want to
    put the spryregion attribute on the Accordion itself, and then put
    a spryrepeat on the actual div that is the panel.
    The next thing to consider, is that anytime Spry regenerates
    the markup for a widget, you have to re-attach all of the widget
    behaviors to the widget. To accomplish this, we have to place a
    listener on the data set. The idea is that every time the data set
    notifies listeners that its data has changed, we know the widget
    markup will be re-generated, so we have to call the constructor for
    the Accordion.
    Here's some actual markup that I whipped up that works:
    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    <title>Dynamic Accordion</title>
    <link href="../../css/accordion.css" rel="stylesheet"
    type="text/css" />
    <script language="JavaScript" type="text/javascript"
    src="../../includes/xpath.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="../../includes/SpryData.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="../../includes/SpryEffects.js"></script>
    <script language="JavaScript" type="text/javascript"
    src="../../includes/SpryAccordion.js"></script>
    <script language="JavaScript" type="text/javascript">
    // Step 1: Define the data set:
    var dsAirports = new
    Spry.Data.XMLDataSet("../../data/airports.xml",
    "/airports/airport");
    // Step 2: Register a listener on dsAirports so that we can
    auto-attach the
    // Accordion behaviors.
    dsAirports.addDataChangedObserver("accordionObserver", {
    onDataChanged: function(ds, dcType) { setTimeout(function() { var
    acc = new Spry.Widget.Accordion("Acc1"); }, 0); } });
    </script>
    </head>
    <body>
    <div id="Acc1" class="Accordion"
    spry:region="dsAirports">
    <div class="AccordionPanel" spry:repeat="dsAirports">
    <div class="AccordionPanelLabel">
    <h3>{code}</h3>
    </div>
    <div class="AccordionPanelContent">
    <div>{name}</div>
    </div>
    </div>
    </div>
    </body>
    </html>
    Note the use of a timer in the listener callback. This is
    necessary to force the Accordion call to be triggered *after* the
    dynamic region has been re-generated. This won't be necessary once
    we implement the dynamic region observers mechanism.
    --== Kin ==--

  • Spry:repeat vs. Internet Explore 7.0

    Hi,
    I've made a very simple example with the Spry Framework -
    using the Spry.repeat
    The example works fine in Fixefox, but IE 7.0 won't display
    the data (no error message)
    HTML-file
    http://www.mg04.dk/clausreiss/test_xml.html
    XML-file
    http://www.mg04.dk/clausreiss/data/cafetownsend.xml
    What is wrong? -Please help me!
    jsnedker

    Everything works fine for me "as is" if I run it from my own
    http server. You might want to look into the Content-Type your
    server is sending for the XML file:
    Content-Length 681
    Content-Type application/octet-stream
    Last-Modified Tue, 08 Jan 2008 19:46:46 GMT
    Accept-Ranges bytes
    Etag "989c0342f52c81:18c96b"
    Server Microsoft-IIS/6.0
    X-Powered-By --InsPanel--
    http://www.inspanel.com,
    ASP.NET
    MicrosoftOfficeWebServer 5.0_Pub
    Date Tue, 08 Jan 2008 21:15:16 GMT
    The content-type should be either "text/xml" or
    "application/xml" for XML files.
    --== Kin ==--

  • 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

  • Failed to retrieve data set for spry:repeat

    Help! I have read all the posts and fixes in the forums, but
    none seem to be helping me. I have moved this coding from my
    homepage to a sub-page. It previously worked fine on the homepage.
    The coding is the same, however I get the same error message each
    time. What am I missing?
    Below is my coding:
    <!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>
    <style type="text/css">
    <!--
    .style1 {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: small;
    .style2 {font-family: Verdana, Arial, Helvetica, sans-serif}
    .style3 {font-size: small}
    .style5 {color: #808000}
    -->
    </style>
    <script src="../../SpryAssets/SpryMenuBar.js"
    type="text/javascript"></script>
    <script src="../../Scripts/AC_RunActiveContent.js"
    type="text/javascript"></script>
    <script src="../../SpryAssets/xpath.js"
    type="text/javascript"></script>
    <script src="../../SpryAssets/SpryData.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    var this_week_mon = new
    Spry.Data.XMLDataSet("../../Data/this_week2.xml",
    "thisweek/day[name='Monday']/items/item",{distinctOnLoad:true});
    var this_week_tue = new
    Spry.Data.XMLDataSet("../../Data/this_week2.xml",
    "thisweek/day[name='Tuesday']/items/item",{distinctOnLoad:true});
    var this_week_wed = new
    Spry.Data.XMLDataSet("../../Data/this_week2.xml",
    "thisweek/day[name='Wednesday']/items/item"{distinctOnLoad:true});
    var this_week_thu = new
    Spry.Data.XMLDataSet("../../Data/this_week2.xml",
    "thisweek/day[name='Thursday']/items/item",{distinctOnLoad:true});
    var this_week_fri = new
    Spry.Data.XMLDataSet("../../Data/this_week2.xml",
    "thisweek/day[name='Friday']/items/item",{distinctOnLoad:true});
    var this_week_sat = new
    Spry.Data.XMLDataSet("../../Data/this_week2.xml",
    "thisweek/day[name='Saturday']/items/item",{distinctOnLoad:true});
    var this_week_sun = new
    Spry.Data.XMLDataSet("../../Data/this_week2.xml",
    "thisweek/day[name='Sunday']/items/item",{distinctOnLoad:true});
    </script>
    </head>
    <body>
    <table>
    <tr>
    <td width="200"><span class="style14
    style1"><strong>Monday</strong></span></td>
    </tr>
    <tr valign="top">
    <td><div spry:region="this_week_mon"><span
    spry:repeat="this_week_mon"><a href="{@href}"class="style14
    style5 style3">{item}</a><br />
    </span></div></td>
    </tr>
    <tr>
    <td width="200"><span class="style14
    style1"><strong>Tuesday</strong></span></td>
    </tr>
    <tr valign="top">
    <td><div spry:region="this_week_tue"><span
    spry:repeat="this_week_tue"><a href="{@href}" class="style14
    style5 style3">{item}</a><br />
    </span></div></td>
    </tr>
    <tr>
    <td width="200"><span class="style14 style2
    style3"><strong>Wednesday</strong></span></td>
    </tr>
    <tr valign="top">
    <td><div spry:region="this_week_wed"><span
    spry:repeat="this_week_wed"><a href="{@href}" class="style14
    style5 style3">{item}</a><br />
    </span></div></td>
    </tr>
    <tr>
    <td width="200"><span class="style14 style2
    style3"><strong>Thursday</strong></span></td>
    </tr>
    <tr valign="top">
    <td><div spry:region="this_week_thu"><span
    spry:repeat="this_week_thu"><a href="{@href}" class="style14
    style5 style3">{item}</a><br />
    </span></div></td>
    </tr>
    <tr>
    <td width="200"><span class="style14 style2
    style3"><strong>Friday</strong></span></td>
    </tr>
    <tr valign="top">
    <td><div spry:region="this_week_fri"><span
    spry:repeat="this_week_fri"><a href="{@href}" class="style14
    style5 style3">{item}</a><br />
    </span></div></td>
    </tr>
    <tr>
    <td width="200"><span class="style14 style2
    style3"><strong>Saturday</strong></span></td>
    </tr>
    <tr valign="top">
    <td><div spry:region="this_week_sat"><span
    spry:repeat="this_week_sat"><a href="{@href}" class="style14
    style5 style3">{item}</a><br />
    </span></div></td>
    </tr>
    <tr>
    <td width="200"><span class="style14 style2
    style3"><strong>Sunday</strong></span></td>
    </tr>
    <tr valign="top">
    <td><div spry:region="this_week_sun"><span
    spry:repeat="this_week_sun"><a href="{@href}" class="style14
    style5 style3">{item}</a><br />
    </span></div></td>
    </tr>
    </table>
    </body>
    </html>
    the webpage is located at
    http://www.harvestfamchurch.org/about_this_week.html
    I have tried everything and can't seem to find the final
    tweak to make it work.
    Thanks.

    Its because you have a JavaScript error on your page.
    in your iframe..
    var this_week_wed = new
    Spry.Data.XMLDataSet("../../Data/this_week2.xml",
    "thisweek/day[name='Wednesday']/items/item"{distinctOnLoad:true});
    it needs a , after your "/items/item"
    var this_week_wed = new
    Spry.Data.XMLDataSet("../../Data/this_week2.xml",
    "thisweek/day[name='Wednesday']/items/item",{distinctOnLoad:true});

Maybe you are looking for