Adding a Counter to Spry Repeat List

Hi, this might seem like a relatively simple problem but after spending some time, I haven't yet arrived at an appropriate solution.
1. I have spry repeat list.
2. I want add a counter (required by a javascript function nested within the repeat list).
I have tried ds2.getCurrentRowID and that failed.
One simple way of thinking of the problem is: how would you modify a spry repeat list to display each row, numbered 1 through n down the left-hand column?
            <tr spry:repeat="ds2" spry:odd="evenRowVenue" spry:even="oddRowVenue" spry:hover="hoverVenue" onClick="MM_callJS('GEvent.trigger(venue_list[INCREMENTING COUNTER HERE],\'click\');')">
              <td align="left"><a href="venue_show.php?vid={@vid}">{@name}</a></td>
              <td align="left">{@street1}</td>
              <td align="left">{@city_suburb}</td>
              <td align="left">{@state}</td>
              <td align="left">{@country}</td>
              <td align="left">{@rating}</td>
            </tr>

secondliver wrote:
Hi, this might seem like a relatively simple problem but after spending some time, I haven't yet arrived at an appropriate solution.
1. I have spry repeat list.
2. I want add a counter (required by a javascript function nested within the repeat list).
I have tried ds2.getCurrentRowID and that failed.
One simple way of thinking of the problem is: how would you modify a spry repeat list to display each row, numbered 1 through n down the left-hand column?
            <tr spry:repeat="ds2" spry:odd="evenRowVenue" spry:even="oddRowVenue" spry:hover="hoverVenue" onClick="MM_callJS('GEvent.trigger(venue_list[INCREMENTING COUNTER HERE],\'click\');')">
              <td align="left"><a href="venue_show.php?vid={@vid}">{@name}</a></td>
              <td align="left">{@street1}</td>
              <td align="left">{@city_suburb}</td>
              <td align="left">{@state}</td>
              <td align="left">{@country}</td>
              <td align="left">{@rating}</td>
            </tr>
{ds_RowNumber} is what you are looking for.
So in you case:
onClick="MM_callJS('GEvent.trigger(venue_list[{ds_RowNumber}],\'click\');')">

Similar Messages

  • 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 repeat list break DW insert transaction?

    Hi,
    Does anyone know if spry repeat lists are recognized by DW as input devices? I added a few to a form, which uses the builtin DW insert record wizard, and they don't show up with the other controls in the server behavior list and they break the transaction (red ! on the insert transaction).
    Are there configuration issues? Or are these widgets only for search and display forms?
    Thanks for any help,
    Tony

    Hi Tony,
    I´m sure that the SPRY repeat lists you´re creating would need some heavy modification in order to become "regular" ADDT dropdown menus -- what they would need at least, is some embedded string comparison (aka PHP´s "strcmp" function) for displaying an existing column value as "SELECTED", like ADDT´s menus do:
    ...and I don´t think your Spry lists provide this for each list option.
    and they don't show up with the other controls in the server behavior list
    it seems as if those lists have one or more required elements missing which DW needs to accept them as valid "control". You can actually check the differences by opening an other ADDT form containing a valid control and taking a look at the HTML/PHP code of that list -- what does it have what your Spry list doesn´t ?
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • ADDT Dependent Dropdown SB with Spry Repeat Lists

    Hi,
    I first want to say that this forum is fantastic and full of very bright folks willing to help us not so bright types.
    Next, of course, I have a problem. I'm using spry repeat lists as dropdowns in a form. There are 3 that need to be dependent on each other. I had been using the ADDT dependent dropdown SB and it works great for normal selects. It doesn't seem to work at all on spry repeat lists. I was hoping these two would play nicely together, and maybe they do and there's some trick to this.
    If the ADDT SB's don't work with Spry repeat lists, maybe there's a way to do this using javascript?
    Thanks in advance for any help,
    Tony Galfano

    Hi Gunter,
    Thanks for the help. I've decided, based on your accurate assessment of the work involved in getting all this to work with spry, to ditch that and just refresh the damn page after all new entries are made. I appreciate your help, probably saved me many hours.
    I do have a wierd issue with the ADDT editaqble dropdown behavior. I actually use this one a lot and it always works well. I have one dropdown that only showsw the first 2 characters of the contents. A swcreenshot is avaiable here: http://www.zenwebguru.com/editabledropdown.jpg
    All of the other editable dropdowns on the page, and the site, work fine, but this one is shruken for some reason. I'm wondering if there is a size limitation in the css or the js that can't handle larger records? The largest field in the table contains the value:
    "Flat Guarantee; Purchaser to provide one Fender Amplifier (see rider for list of amps) at no cost to Artist."
    This really shouldn't present a problem, but maybe it's something else?
    Thanks, as always for your great help.
    Tony

  • Limiting Items Displayed in Spry Repeat Lists, Tables, Etc.

    Is it possible to limit the items shown in Spry repeat
    region? For example say I have 20 items in a list and only want to
    display the first three items, not the entire list. If so how is
    that done?

    Hey Oscar,
    Glad that works for you.
    Kin and I were thinking that {ds_RowNumber} might be better
    for that particular looping, but you get the idea.
    http://labs.adobe.com/technologies/spry/articles/data_set_overview/index.html
    That was our first overview doc and it was definitive at the
    time. We no longer update it but it's a good intro to Spry.
    You can find the built in data references in that doc,
    granted almost at the very bottom.
    The API doc
    http://labs.adobe.com/technologies/spry/articles/data_api/index.html
    is a good start but we still have a lot to add to it. I have
    plans for it for sure.
    We are doing a big push for 1.6 towards progressive
    enhancement, unobtrusive js and things like that.
    Expect docs and samples and some cool utilities to come out
    this summer and for 1.6.
    And we won't charge for it, but we also won't return any
    cash-laden envelopes... ;)
    Let us know how to improve any part of Spry.
    Thanks,
    Don

  • Adding an image to .xml for a spry repeating list or data set

    How do I code my .xml so that as well as the text the spry displays an image for each entry? Do I need to create a seperate gallery rather than draw from my root images folder?

    Have a look here
    http://www.coremediadesign.co.uk/learn_web_design/free_web_design_tutorials/tutorial/spry_ image_gallery_adobe.html

  • Filter spry table from repeater list

    Using Dreamweaver, I am looking to find out how to link a
    spry repeat list (Select Drop-Down) to a Spry table.
    I have created a repeat list (Select Drop-Down) using a
    distinct filter on a field in my XML data base :
    The XML database is:
    var ds2 = new
    Spry.Data.XMLDataSet("Data/NetballDatafeed190401.xml",
    "NetballList/NetballProducts/SubType",{sortOnLoad:"SubType",sortOrderOnLoad:"as
    cending",distinctOnLoad:true});
    The drop down list is created by
    <div spry:region="ds2">
    <select name="select" spry:repeatchildren="ds2">
    <option value="{SubType}">{SubType}</option>
    </select>
    </div>
    I have a table which I want to show only the values on the
    table where the subType that matches the value from the select
    list.
    This data is populated by:
    var ds1 = new
    Spry.Data.XMLDataSet("Data/NetballDatafeed190401.xml",
    "NetballList/NetballProducts",{sortOnLoad:"ProductPrice",sortOr
    derOnLoad:"ascending"});
    and is created by
    div spry:region="ds1">
    <table>
    <tr>
    <th>ProductName</th>
    <th>ProductPrice</th>
    <th>ImageURL</th>
    <th>SubType</th>
    </tr>
    <tr spry:repeat="ds1">
    <td>{ProductName}</td>
    <td>{ProductPrice}</td>
    <td><img src="{ImageURL}"/></td>
    <td>{SubType}</td>
    </tr>
    </table>
    </div>
    I believe that I need to create a spry:Choose statement in
    the drop down list which runs a function that filters the DS1 XML
    data.
    I beleive that The function need to look like
    var myFilterFunc = function(dataSet, row, rowNumber)
    some funtion here that filters ds1 on {SubType}.......
    I will then need to run ds1.filter(myFilterFunc);
    Any pointers or examples most welcome.

    to do the the spry:if="'statement" needs to be in the
    <tr> rows you want to filter on

  • How to Display Repeat List In Spry Tab Content

    Hello,
    I am new to Spry. I thought I could just create an XML
    dataset, Insert a Spry Tabbed Panel, and then insert a Spry repeat
    list inside the Tabbed Content area of the Tabbed Panel. It is not
    working at all for me. Is this doable at all? If so, how?
    Thanks!

    hi,
    i have created an example in http://apex.oracle.com/pls/apex/f?p=44310:1:3623155419174978:::::
    username/password: demo/demo
    check, it may help you:)
    *please mark the thread answered if it done:)
    regards
    Little Foot

  • Adding a metadata to Flash builder list

    Hello,
    Where should I look for if I want to add metadatas to Flash Builder's metadata list ?
    I just want my custom metadatas to beneficiate from the metadata coloring Flash builder editor offers. Or even better, define another color for my custom metadatas, but I don't think this is as easy or even possible. ( For instance, the default metadatas come with the blue color, mine would be orange )
    Thanks,
    Alex Galays

    secondliver wrote:
    Hi, this might seem like a relatively simple problem but after spending some time, I haven't yet arrived at an appropriate solution.
    1. I have spry repeat list.
    2. I want add a counter (required by a javascript function nested within the repeat list).
    I have tried ds2.getCurrentRowID and that failed.
    One simple way of thinking of the problem is: how would you modify a spry repeat list to display each row, numbered 1 through n down the left-hand column?
                <tr spry:repeat="ds2" spry:odd="evenRowVenue" spry:even="oddRowVenue" spry:hover="hoverVenue" onClick="MM_callJS('GEvent.trigger(venue_list[INCREMENTING COUNTER HERE],\'click\');')">
                  <td align="left"><a href="venue_show.php?vid={@vid}">{@name}</a></td>
                  <td align="left">{@street1}</td>
                  <td align="left">{@city_suburb}</td>
                  <td align="left">{@state}</td>
                  <td align="left">{@country}</td>
                  <td align="left">{@rating}</td>
                </tr>
    {ds_RowNumber} is what you are looking for.
    So in you case:
    onClick="MM_callJS('GEvent.trigger(venue_list[{ds_RowNumber}],\'click\');')">

  • Adding behavior to spry:repeat

    Hi all,
    I need to hook into the creation of DIVs during data load (using SpryData) to add behavior to the DIV.  Is there some built-in hook, or event that is thrown to do this?  Or do I need to hack SpryData to do it?
    Basically, what I want to do is position each element in a specific space, and then add custom events to each DIV as it is created.
    The code I have so far looks like this:
    <body>
         <div id="mainContainer">
              <div id="menuContainer" class="MenuContainer">
                   <div id="profileMenu" class="ProfileMenu" spry:region="dsIndigoProfileMenu">
                        <div id="p{ds_RowNumber}" class="ProfileMenuItem" spry:repeat="dsIndigoProfileMenu">
                             <div class="content">{@label}</div>
                        </div>
                   </div>
                   <div id="mainMenu" class="MainMenu" spry:region="dsIndigoMainMenu">
                        <div id="m{ds_RowNumber}" class="MainMenuItem" spry:repeat="dsIndigoMainMenu">
                             <div class="content">{@label}</div>
                        </div>
                   </div>
                   <div id="subMenu" class="SubMenu">
                        SUB
                   </div>
              </div>
         </div>
    </body>
    For each spry:repeat section, I need to hook in so I can alter the inner DIV (class="content") to layout the information in a specific manner.
    Any input greatly appreciated!
    Cheers,
    Chris

    Not sure what you mean by hooks, but if you are speaking of styling content, use CSS. Leave the Spry Data Javascript file intact, or it will act up on you. If your 'chunks' of data are what you want to dive into and style bits of each chunk (all technical terms...), you might need to subdivide your data into smaller chunks. Then, wrapping in divs with classes will give you control over styling.
    You already have a cascade of classes and ids in your code that you can use to attach styles to.
    If you are talking about adding Javascript behaviors, they are typically "attached" using <a> tags, as you need to have defined elements to attach them to.
    But generally speaking, when you use Spry:Repeat regions you can totally style up your first region, including the behaviors, then when 'running' the repeat, all the styling and behavior is copied to the repeats.
    Beth

  • TS1702 I purchased holiday add-ons for the UtiliTap Week Calendar.  I wanted basic holidays.  Once added my calendar was flooded with listings for holidays, the majority obscure, repeatedly listed. The "hide calendar" would work only till the next time I

    I purchased holiday add-ons for the UtiliTap Week Calendar.  I wanted basic holidays.  Once added my calendar was flooded with listings for holidays, the majority obscure, repeatedly listed. The "hide calendar" would work only till the next time I opened it. These holidays were listed on the built-in iPhone calendar as well as the UtiliTap Week Calendar. I actually want to delete the two purchases because I tried deleting the UtiliTap Calendar (where I purchased the add-on holidays) and the holidays still showed up on my built in iPhone calendar.

    I purchased holiday add-ons for the UtiliTap Week Calendar.  I wanted basic holidays.  Once added my calendar was flooded with listings for holidays, the majority obscure, repeatedly listed. The "hide calendar" would work only till the next time I opened it. These holidays were listed on the built-in iPhone calendar as well as the UtiliTap Week Calendar. I actually want to delete the two purchases because I tried deleting the UtiliTap Calendar (where I purchased the add-on holidays) and the holidays still showed up on my built in iPhone calendar.

  • Double spry:repeat for menue list

    Hi,
    My first 12 h with spry and ajax were quite succesfull but
    now there is a point were I can't get along.
    Ich have extendet the galleries.xml file with another
    dimension:
    <kategories>
    <kategory>
    <targetname>Kategory1</targetname>
    <galleries>
    <gallery base="island/" file="photos.xml">
    <region>Gallerie1</region>
    </gallery>
    <gallery base="iceland/" file="photos.xml">
    <region>Gallery2</region>
    </gallery>
    </galleries>
    </kategory>
    </kategories>
    My goal is to create a vertical navigation menue like:
    Kategory1
    Gallery1
    Gallery2
    Kategory2
    Gallery3
    Gallery4
    I wanted to archieve this with a douple spry:repeat in the
    following code:
    <div spry:region="dsKategories dsGalleries" >
    <div spry:repeat="dsKategories">
    <div >{dsKategories::targetname</div>
    <div spry:repeatchildren="dsGalleries">
    <div>{dsGalleries::region}</div>
    </div>
    </div>
    </div>
    but the result looks like that:
    Kategory1
    Gallery1
    Gallery2
    Kategory2
    Gallery1
    Gallery2
    Can anyone give me a hint, what I'm doing wrong or what I
    might have misunderstood?
    Greeting from Cologne, Germany
    Markus

    Hi pygmaleon,
    The reason you don't get what you expect is because your
    dsGalleries data set is only selecting the first gallery for the
    first category because of the XPath you set on it. If you want to
    use Spry to accomplish what you want, you'll have to do some slight
    restrucuring of your XML. Perhaps something like this:
    <galleries>
    <kategories>
    <kategory id="1">
    <targetname>Kategory1</targetname>
    </kategory>
    <kategory id="2">
    <targetname>Kategory2</targetname>
    </kategory>
    </kategories>
    <gallery base="g1/" file="photos.xml" kategory="1">
    <region>Gallerie 1</region>
    </gallery>
    <gallery base="g2/" file="photos.xml" kategory="1">
    <region>Gallerie 2</region>
    </gallery>
    <gallery base="g3/" file="photos.xml" kategory="2">
    <region>Gallerie 3</region>
    </gallery>
    </galleries>
    And then you can do something like:
    var dsKategories = new
    Spry.Data.XMLDataSet("galleries/kategories.xml",
    "/galleries/kategories/kategory" )
    var dsGalleries = new
    Spry.Data.XMLDataSet("galleries/kategories.xml",
    "/galleries/gallery" );
    <div spry:region="dsKategories dsGalleries" >
    <div spry:repeat="dsKategories">
    <div >{dsKategories::targetname</div>
    <div spry:repeatchildren="dsGalleries">
    <div spry:if="{dsKategories::@id} ==
    {dsGalleries::@kategory}">{dsGalleries::region}</div>
    </div>
    </div>
    </div>
    --== Kin ==--

  • 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 select list code to wire it to html data table SET column?

    I am making a page based on Figure 15-14, Pg 878, in David Power's book, "Dw CS4 with CSS, Ajax and PHP. I have two separate html data tables hidden in the page, one for the specialties drop down select list and the other for the teachers master/detail regions. These are populated with php and working well. The spry select list and master/detail regions are working great except for one issue. The column in my html data table that is being filtered ("Specialty" in my code = 'Category' in the book's example code) is a SET column (with possible value of 1, 2, 3, 4, and/or 5). Clicking on the drop down menu brings up the records with a single value beautifully. The result for records with multiple values is a spry error "Invalid row number: 0". After four different versionings and methods of messing with this, I still haven't a clue. Please help me with how to rewire the Spry select list code so that it will read the records that have multiple items in that column. I have included the code below.
    var data_set_teachers = new Spry.Data.HTMLDataSet(null, "teacher_data");
    data_set_teachers.gallery = '1';
    function chooseSet(dataSet, row, rowNumber)
    if (row["Specialty"] == data_set_teachers.gallery) {
       return row;
    return null;
    data_set_teachers.filter(chooseSet);
    function changeSet(set)
    data_set_teachers.gallery = set;
    data_set_teachers.filter(chooseSet);
    data_set_teachers.setCurrentRowNumber(0);
    var rows = data_set_teachers.getData();
    for (var i = 0; i < rows.length; i++) {
       if (rows[i]["Specialty"] == set) {
         data_set_teachers.setCurrentRowNumber(i);
         break;
    var data_set_specialties = new Spry.Data.HTMLDataSet(null, "specialty_data");

    Well I'll be damned!
    What's done in the sample app is, of course, the intuitively obvious choice and is exactly what I started out trying to do the first time round.
    But as I mentioned before, when I first tried it (yes: I'm pretty sure I set the "for" attribute on the inlineMessage components), I got the non-unique component id exception for the inlineMessage component(s) after adding the second (but not the first) row to the page.
    Anyway, after dragging my inlineMessages to the exact same position as those in the AppModel example, now things work fine (except I think I'd like a line break before the message and to change the row/column styles so the values and messages line up properly...the look is rather ugly in the AppModel example when there are validation messages displayed).
    Not sure, but I'm thinking maybe there was an issue with where the inline message markup was placed, my first time through, relative to the data table value bound component and the column header facet?
    I was using the application view drag 'n drop feature the first time round and dragged the inlineMessage component to the spot just below the data table value bound component and hence just above the column header facet. In the AppModel example, OTOH, the inline messages are placed just after the column header facet.
    Of course, I will now try to duplicate the original exception.
    If I can (and it is an issue with placement), I will post back some sort of bug report or RFE. Otherwise, I'll post back declaring what a bone head I've been...;-)
    Anyway, thanks for the quick response, v.
    Campbell

  • Passing values to a function from spry:repeat

    Is this a viable solution?
    &lt;div spry:repeat=&quot;dsData&quot;&gt;
    &lt;script
    type=&quot;text/javascript&quot;&gt;addPin(&quot;{ds_RowNumberPlus1}&quot;,&quot;{site}&q uot;,&quot;{latitude}&quot;,&quot;{longitude}&quot;);&lt;/script&gt;
    &lt;/div&gt;

    quote:
    Originally posted by:
    victor.corey
    Hello V1 Fusion,
    Yes this did work. Thank you.
    For clarification, why add this to a spry:if in a hidden span
    versus just adding a javascript script block inside the
    spry:repeat. Both seem to work so far, but it seems your solution
    may help with error handling???
    Thanks,
    Victor Corey
    I know u could use functions in Spry if, im
    using them my self i should show a row based on cookie values ( the
    function checks if certain data is in a cookie, and if its there it
    shows the row).
    I was about to use the same technique for my own project my
    self to, so i thought it would be a good way to gather certain
    data, based on what u get returned from your own data set.
    And if u add a javascript block, each time u repeat it, it
    has to be created. its allot smaller size wise to create a little
    span (or u can even add it to the repeat self). That was basicly
    the reason why i suggested using a spry:if ^_^

Maybe you are looking for

  • PI 7.1 - Multiple Operations - NO_RECEIVER_CASE_ASYNC

    Hello All I am using PI 7.1, Proxy to JDBC scenario. I a trying to use a single Service Interface with multiple operations (Customer, Vendor). When I test the scenario I am getting the error "NO_RECEIVER_CASE_ASYNC" at SXMB_MONI. Receiver Determinati

  • How to use counter in this case

    in my selection screen i have billing doc no-vbeln. in my ztable i have etimes a field. when i enter a bill doc no and press f8, my etimes feild in ztable sets to 1. my requirement is if i enter a bill doc as 97600654 for first time, etimes is 1. for

  • Production in alternative plant

    hi pp gurus                  i have one problem in production in alternative plant.   I created one bom for A material in planning plant with special p.key 80 and stg 40 as well as routing also.AT the same time i created different bom for A materilal

  • Where Are My Missing Master Images?

    I keep my Aperture Library as a "managed" library rather than "referenced, so every master image is kept inside the Aperture Library icon. Today I decided to look inside my Aperture Library (by selecting Show Package Contents), and I can only find ma

  • Why optimizer prefers nested loop over hash join?

    What do I look for if I want to find out why the server prefers a nested loop over hash join? The server is 10.2.0.4.0. The query is: SELECT p.*     FROM t1 p, t2 d     WHERE d.emplid = p.id_psoft       AND p.flag_processed = 'N'       AND p.desc_poo