Caught exception in Spry.Data.Region.

Hi there every one...
I getting this error and i cant get around it can anyone help
me, thanks in advanced.....
code:
<div spry:region="pvprefix" class="SpryHiddenRegion">
<a href="javascript:pvprefix.previousPage();"
spry:if="{ds_PageNumber} != '1'"><-- <? echo
ucfirst($traducoes['_anterior']);?></a>   
<a href="javascript:pvprefix.nextPage();"
spry:if="{ds_PageNumber} != {ds_PageCount}"><? echo
ucfirst($traducoes['_proximo']);?> --></a>
</div>
error:
Caught exception in Spry.Data.Region.prototype.processTokens
while evaluating: != '1' Exception:SyntaxError: syntax error
Caught exception in Spry.Data.Region.prototype.processTokens
while evaluating: != Exception:SyntaxError: syntax error
i have a similer code above and it works fine:
code:
<div spry:region="pvprefix" class="SpryHiddenRegion">
<p spry:if="{ds_UnfilteredRowCount} &gt; 0"><?
echo ucfirst($traducoes['_pagina']);?> {ds_PageNumber} <?
echo ucfirst($traducoes['_de']);?> {ds_PageCount} - <? echo
ucfirst($traducoes['_items']);?> {ds_PageFirstItemNumber} -
{ds_PageLastItemNumber} <? echo ucfirst($traducoes['_de']);?>
{ds_UnfilteredRowCount}</p>
<p spry:if="{ds_UnfilteredRowCount} == 0"><? echo
ucfirst($traducoes['_erro_destinos']);?></p>
</div>

I think this is happening when there is no data to page. In
that case your {ds_PageNumber} is not defined so your spry:if
attribute probabaly ends up looking like this:
spry:if="!= '1'"
You can either quote your {ds_PageNumber} which you should
probably do cause your '1' is quoted:
spry:if="'{ds_PageNumber}' != '1'
or only execute that markup if you have rows of data:
<div spry:region="pvprefix"
spry:if="{ds_UnfilteredRowCount} > 0">
</div>
--== Kin ==--

Similar Messages

  • Has anyone implemented CKEditor in a Spry Data Region?

    I have been trying to implement an HTML editor in a Spry Data Region without success.
    CKEditor is a follow up from FCKEditor and is supposed to slot into Ajax applications.
    The website is here: http://docs.fckeditor.net/CKEditor_3.x/Developers_Guide.
    Any help will be greatly appreciated.
    Ben

    Just make sure you call the
    CKEDITOR.replace('editor1'); // editor1 being the id of your text area
    everytime the region gets updated. The best way to do this is add a Spry region observer, that calls that line of code during the onPostUpdate observer.
    Read more about the observers here:
    http://labs.adobe.com/technologies/spry/articles/data_set_overview/index.html

  • Split Spry.Data and Spry.Data.Region from SpryData.js?

    I don't like Spry.Data.Region or anything like Spry.*.Region because it make hard to customize using javascript.
    But Spry.Data with Observer / Notify feature is great one. In fact, using SpryData.js, I can write my own "render html object" easier.
    SrpyData.js is big (127KB) even when compressed, it is still 65KB. That why, needed split Spry.Data and Spry.Data.Region from SpryData.js so who want to use Spry.Data only like me will get smaller trafic.
    I've tried remove all Spry.Data.Region content in SpryData.js. Surprise, some in Spry.Data call to Spry.Data.Region >>> Design have problem.
    Anyone can help splitting them?

    Found this in the archives:
    <div spry:if="{ds_RowCount} == 0" class="trigger" style="display:none"></div>
    Basically a hack to point the tooltip to a hidden div so no errors are thrown.

  • Spry data region to display multiple data sources

    I'm developing an interactive menu using the Spry and Ajax framework that lists the menu items on the left (in a Spry accordion) to a corresponding image and description on the right. I have the basic functionality working, however, my menu items are broken into sub categories, and I can't seem to get my detail region to display attributes for more than 1 ds.
    My current status is here: http://bit.ly/PUG1y
    As you can see, my menu is broken into sections; i.e. Tapas, Pizzas, Entrees...etc. The Tapas secion works perfectly, and the Pizza section appears correctly on the left. However, I cannot get the detail region on the right to link to both Tapas and Pizzas. Right now I am trying to use separate XML files for each category, but could see my XML looking like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <menu>
      <tapas>
           <item>
              <name>Fresh Tilapia Dip</name>
              <title>Fresh Tilapia Dip</title>
              <image>../one0one/images/food/crab_cakes.jpg</image>
              <desc>Mesquite Smoked Fresh Fish w/ Tortilla Chips and Pickled Jalapenos $6.99</desc>
           </item>
           <item>
                <name>Jamaican Jerk Chicken Satay</name>
              <title>Jamaican Jerk Chicken Satay</title>
              <image>../one0one/images/food/satay.jpg</image>
              <desc>Served with Pineapple Chutney w/ 101’s Spicy Tartar. $9.99</desc>
           </item>
        </tapas>
        <pizzas>
           <item>
                   <name>Pizza1</name>
                   <title>Pizza1</title>
                   <image>img.jpg</image>
                   <desc>description</desc>
           </item>                     
        </pizzas>
    </menu>
    I do not know how to set up the Spry regions to get this to work.  This seems like it should be pretty straightforward, but I have not had a lot of experience using Spry. What is the easiest/best practice method to get this to work correctly? Thanks for your help.

    I feel your pain... I was JUST running into the same issue and debated on using a similar menu for the restaurant site I did.
    Anyhow, here's how you do it. I solved it with this answer here: SOLVED: Multiple Data Sets (renamed)
    You can reference the source code here. Data Set Shell with Accordion
    The skinny version goes like this: You take your multiple data sets and combine them into one "Shell" using SpryDataSetShell.js
    Copy that to your Spry Assets folder and link to it alnog with your Accordian JS files.
    <script src="../../includes/SpryDataSetShell.js" type="text/javascript"></script>
    create a shell of all your datasets.
    var DATASET_2 = new Spry.Data.HTMLDataSet("../link_to_dataset", "Event_Table");
    var NEW_DATASET_SHELL = new Spry.Data.DataSetShell(dataMay);
    Then substitute your NEW_DATASET_SHELL in your code for the detail on the right
    <div spry:detailregion="NEW_DATASET_SHELL" class="YourContainer">
    Create an OnClick call in your accordian menu on the left...
    <div class="AccordionPanelContent" spry:region="DATASET_1"><p spry:repeat="DATASET_1" spry:setrow="DATASET_1" onclick="NEW_DATASET_SHELL.setInternalDataSet(DATASET_1, true);">{item} {item}</p></div>
    Do that for each of your accordian panels... Good Luck. Let me know if you need anything else.

  • Can clicking on an Accordion Tab also open a separate Spry Data region?

    I am generating a spry Acordion to list programs for an organization. When someone clicks on a tab and the content shows below I would like a set of photos and comments to open in a different adjacent div. I am wondering if the tab could act as the sorting catagory for a set the images/comments to appear next to the Acordion. Is it possible? I am new to all this and do not know javascript.

    Here is what I have so far:
    http://www.suffieldeaa.org/ProgR4.html
    The example you sent seems to put the content to the right that includes pictures and text. What I want is the content as a usual Accordion box and also opens a data set to the right where my fixed images are. My data set would include images of the related content and also include quotes. The html in your example doesn't seem to clearly reflect where the Accordion is and where the dataset  region is unless it is just the Accordion only. I hope I am making sense.....

  • Problem with tooltips and spry data using startLoadInterval

    I am trying to use tooltips with a dynamic table using the spry data example at the bottom of the page:
    http://labs.adobe.com/technologies/spry/articles/tooltip_overview/index.html
    I have it working except that it appears to have a memory leak as firefox's memory usage continues to grow.
    I did notice there is a 'new' inside the onPostUpdate:function that is being called on every table update.
    So after looking at the tooltip code I modified the function to:
    <script type="text/javascript">
    var tt1;
    var observer = {onPostUpdate:function(){if(tt1 == null){tt1 = new Spry.Widget.Tooltip('tooltip','.trigger');}else{tt1.destroy(); tt1.destroy();if(tt1.checkDestroyed()) alert("destroyed");else alert("not destroyed");delete tt1; tt1 = new Spry.Widget.Tooltip('tooltip','.trigger');}}}
    Spry.Data.Region.addObserver('mainRegion', observer);
    </script>
    The tt1.checkDestroyed() always returns false and my memory usage continues to grow.
    Any help?

    Thanks for the reply.  I found a way to get it to work by changing my
    observer function to the following:
    else{tt1.destroy();
    tt1.init('.trigger', 'tooltip',
    {});tt1.attachBehaviors();Spry.Widget.Tooltip.loadQueue.push(tt1);}}
    Probably not very clean but it doesn’t grow memory and works correctly.
    I just put it back to the old way as in the example with a
    startLoadInterval(1500) :
    And I am over 500MB after ~ 30 minutes where as the top code above ran with
    a startLoadInterval(1500); overnight and is about ~120MB.
    I am using a double repeatchildren loop to build a table with tooltips for
    each cell which may affect it.
    Bottom line is I have a way to make it work so I am moving forward.  If you
    still want to see it I might be able to get it up on the internet and give
    you a link.
    Thanks,
    Greg Wirth

  • Using validation widgets within a data region

    My problem stems from the fact that when I place Spry Validation Widgets in a form within a Spry Data Region, the validation widgets do not work. When I remove the data region, all is well.
    Please help!
    This is a sample 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>Untitled Document</title>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var dsMembers = new Spry.Data.XMLDataSet("data/members_xml.php", "export/row", {useCache: false});
    //-->
    </script>
    </head>
    <body>
    <div spry:region="dsMembers">
      <form id="editForm" name="editForm" action="">
        <table>
          <tr id="email">
            <td>E-mail:</td>
            <td>
              <input name="email_mem" type="text" id="email_mem" value="{username}" />
              <span class="textfieldRequiredMsg">The value is required.</span>
              <span class="textfieldInvalidFormatMsg">Invalid format.</span>
            </td>
          </tr>
          <tr id="password">
            <td>Password:</td>
            <td>
              <input name="password_mem" type="password" id="password_mem" value="{password}" />
              <span class="textfieldRequiredMsg">The value is required.</span>
              <span class="textfieldMinCharsMsg">The minimum number of characters not met.</span>
              <span class="textfieldMaxCharsMsg">The maximum number of characters exceeded.</span>
            </td>
          </tr>
          <tr id="site">
            <td>Website:</td>
            <td>
              <input name="website_mem" type="text" id="website_mem" value="{buswebsite}" />
              <span class="textfieldRequiredMsg">The value is required.</span>
              <span class="textfieldInvalidFormatMsg">Invalid format.</span>
            </td>
          </tr>
          <tr id="date">
            <td>Date:</td>
            <td><input name="registrationdate_mem" type="text" id="registrationdate_mem" value="{registrationdate}" />
            <span class="textfieldInvalidFormatMsg">Invalid format.</span> <span class="textfieldRequiredMsg">A value is required.</span></td>
          </tr>
          <tr>
            <td colspan="2">
              <input type="submit" name="Submit" id="Submit" value="Submit" />
              <input name="Reset" type="reset" value="Reset" />
            </td>     
          </tr>
        </table>
      <script type="text/javascript">
        <!--
        var email = new Spry.Widget.ValidationTextField("email", "email", {validateOn:["blur"]});
        var password = new Spry.Widget.ValidationTextField("password", "none", {minChars:6, maxChars:10, validateOn:["blur"]});
        var site = new Spry.Widget.ValidationTextField("site", "url", {validateOn:["blur"]});
        var date = new Spry.Widget.ValidationTextField("date", "date", {validateOn:["blur"], format:"dd/mm/yyyy", useCharacterMasking:true});
        //-->
        </script>
      </form>
    </div>
    </body>
    </html>
    Ben

    Ben,
    You need to add a function observer that will instantiate the form widgets and  add the Form Widget Init observer to the region.
    The modified code is as follows:
    <!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>
    <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var dsMembers = new Spry.Data.XMLDataSet("data/members_xml.php", "export/row", {useCache: false});
    //  Define a function observer that will instantiate the form widgets.
    var widgetInitObserver = function(nType, notifier, data) {
        if(nType == 'onPostUpdate'){
            var email = new Spry.Widget.ValidationTextField("email", "email", {validateOn:["blur"]});
            var password = new Spry.Widget.ValidationTextField("password", "none", {minChars:6, maxChars:10, validateOn:["blur"]});
            var site = new Spry.Widget.ValidationTextField("site", "url", {validateOn:["blur"]});
            var date = new Spry.Widget.ValidationTextField("date", "date", {validateOn:["blur"], format:"dd/mm/yyyy", useCharacterMasking:true});
    //    add the Form Widget Init observer to the region
    Spry.Data.Region.addObserver('formregion', widgetInitObserver);
    //-->
    </script>
    </head>
    <body>
    <form id="editForm" name="editForm" action="">
      <div id="formregion" spry:region="dsMembers">
        <table>
          <tr id="email">
            <td>E-mail:</td>
            <td>
              <input name="email_mem" type="text" id="email_mem" value="{username}" />
              <span class="textfieldRequiredMsg">The value is required.</span>
              <span class="textfieldInvalidFormatMsg">Invalid format.</span>
            </td>
          </tr>
          <tr id="password">
            <td>Password:</td>
            <td>
              <input name="password_mem" type="password" id="password_mem" value="{password}" />
              <span class="textfieldRequiredMsg">The value is required.</span>
              <span class="textfieldMinCharsMsg">The minimum number of characters not met.</span>
              <span class="textfieldMaxCharsMsg">The maximum number of characters exceeded.</span>
            </td>
          </tr>
          <tr id="site">
            <td>Website:</td>
            <td>
              <input name="website_mem" type="text" id="website_mem" value="{buswebsite}" />
              <span class="textfieldRequiredMsg">The value is required.</span>
              <span class="textfieldInvalidFormatMsg">Invalid format.</span>
            </td>
          </tr>
          <tr id="date">
            <td>Date:</td>
            <td><input name="registrationdate_mem" type="text" id="registrationdate_mem" value="{registrationdate}" />
            <span class="textfieldInvalidFormatMsg">Invalid format.</span> <span class="textfieldRequiredMsg">A value is required.</span></td>
          </tr>
          <tr>
            <td colspan="2">
              <input type="submit" name="Submit" id="Submit" value="Submit" />
              <input name="Reset" type="reset" value="Reset" />
            </td>     
          </tr>
        </table>
      </div>
    </form>
    </body>
    </html>
    I hope this helps.
    Ben

  • Usin Spry$$ in spry:repeat regions

    Hi,
    I'm not sure whats happening here but i'll try to be
    detailed.
    I am using spry to make a master page set.
    on a region i have
    quote:
    var observer = { onPostUpdate: function(notifier, data) { var
    r = Spry.$$(".changeStatusLink").addEventListener("click",
    changeStatus, true); } };
    where the element selector is
    quote:
    <td align="center" valign="middle" nowrap="nowrap"
    spry:setrow="ds1 {ds_rowID}">[EDIT] | [<a
    id="statusLink{ds_RowID}" class="changeStatusLink">CHANGE
    STATUS</a>] | [DELETE]</td>
    in a
    spry:repeat region
    Now on a "click" the selector is able to trigger the
    changeStatus function....but for some reason
    only the first row's {ds_RowID} of the
    spry:repeat is being captured when the function
    "changeStatus"
    is
    quote:
    function changeStatus(e){
    var row = ds1.getCurrentRow();
    var id = row['@id'];
    alert(id);
    is it the fact that because the "class" is being repeated it
    is not picking up the actual "element" that triggered the event? or
    is there something wrong with the ds1.getCurrentRow?Text

    the spry:repeat IS on the
    <tr>
    I don't have a URL
    but the code is...
    quote:
    <!--
    var ds1 = new Spry.Data.XMLDataSet("get_docs.php",
    "documents/doc",{sortOnLoad:"@section",sortOrderOnLoad:"ascending",useCache:false});
    ds1.setColumnType("@id", "number");
    function MySuccessCallback(req)
    var state = req.xhRequest.responseText;
    if(state == 1){
    ds1.setDataFromArray([req.userData]);
    }else if(state == 2){
    }else{
    function MyErrorCallback(req)
    // Throw an alert with the message that was
    // passed to us via the userData.
    alert("ERROR: " + req.userData.msg);
    function changeStatus(e){
    alert(e.target);
    var row = ds1.getCurrentRow();
    var id = row['@id'];
    alert(id);
    var req = Spry.Utils.loadURL("POST", "set_status.php", true,
    MySuccessCallback, { postData: "docid="+id+"&action=status",
    headers: { "Content-Type": "application/x-www-form-urlencoded;
    charset=UTF-8" }, errorCallback: MyErrorCallback, userData: row })
    var observer = { onPostUpdate: function(notifier, data) { var
    r = Spry.$$(".changeStatusLink").addEventListener("click",
    changeStatus, true); } };
    Spry.Data.Region.addObserver("documentList", observer);
    Spry.Utils.addEventListener(Spry.$$(".changeStatusLink"),"click",changeStatus,true);
    //-->

  • Spry expanding region - wrong CSS shows?

    I'm using a series of expanding regions. Via their CSS, I'm
    displaying one background image in the tab when open, a different
    one when closed.
    Two of the regions I have set to start in their opened state.
    Although they are open, they are displaying the "closed" image. If
    I close them, then open them, then they correctly display the
    "open" image.
    Why is this? How can I ensure that the divs that start "open"
    display the image set in the css?
    .CollapsiblePanelTab {
    ...other stuff...
    background: #899F55 url(../images/plus.gif) no-repeat 5px
    center;
    border-bottom: 1px solid #686155;
    .CollapsiblePanelOpen .CollapsiblePanelTab {
    background: #899F55 url(../images/minus.gif) no-repeat 5px
    center;

    The partial answer is that I was using incorrect syntax. I
    started going through the SimpleAutosuggest, and found the
    following:
    quote:
    Spry.Data.Region.addObserver(regionID, { onPostUpdate:
    function(notifier, data) {
    self.attachClickBehaviors();
    Which was basically the syntax I was looking for, which
    allows me to use the object notation instead of the function
    notation, and call through an object that each autosuggest object
    is tied to.
    However, it brings me back to my original problem. I've gone
    through the Region Observer Notifications documentation here:
    http://livedocs.adobe.com/en_US/Spry/SDG/help.html?content=WS57937FB2-D8C1-424d-B3E4-655FD 7A7899B.html
    ... and in another place, I read that in a callback, you cannot
    pass variables because it will run the call back immediately, and
    not when you expect it to. That seems to be my problem, but
    regardless of if I pass parameters, I get no call back when I
    expect it. If I pass parameters, I get the call back immediately,
    but not later, if I don't pass parameters, I never get the
    callback.
    It's got to be something dumb, but I don't see what it is,
    and unfortunately, I have no way of putting the code outside our
    firewall until it goes live. :(
    Thank you for trying.

  • Update data region content after submitForm

    Hi,
    I have a spry data region called "event_comments". When I use
    the Spry.util.submitForm, i want the data region to reload. I have
    tried putting event_comments.loadData();, but that doesnt work. my
    current code in the callback function is:
    function updateEventComments(req)
    Spry.Utils.updateContent('event_comments',
    'xmleventcomments.php5?id=1');
    I feel like this should have a very simple solution and after
    searching for an hour, an easy out would be much appreciated.
    Thanks.

    I figured it out. I must turn of caching!
    {useCache:false}
    (and use dataLoad(); not updatecontent)

  • How to move elements within the master region of a Master/Detail spry data set?

    Hi there,
    I am unsure of how to move the different items within the master region of a master/detail spry dataset. The default style is such that if I include 3 or more elements e.g. Thumb, etc., they are stacked vertically :
    How do I move them so that they can be positioned differently? The look I am going for is one where the thumb image is positioned to the left while the other items are stacked alongside it so that the end effect for the master region would look like this:
    I greatly appreciate the help! Thanks!

    This is the complete page
    <!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>Check :: Fashion+Lifestyle</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/SpryEffects.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryHTMLDataSet.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMasterDetail_final.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    var cal4 = new Spry.Data.HTMLDataSet("calendarList.html", "calendarList", {sortOnLoad: "When", sortOrderOnLoad: "ascending"});
    cal4.setColumnType("Thumb", "html");
    cal4.setColumnType("Picture", "html");
    cal4.setColumnType("When", "date");
    function MM_effectAppearFade(targetElement, duration, from, to, toggle)
        Spry.Effect.DoFade(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
    function closeAd() {
        document.getElementById('adRollover').style.visibility='hidden';   
    function MM_effectBlind(targetElement, duration, from, to, toggle)
        Spry.Effect.DoBlind(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
    function MM_effectSlide(targetElement, duration, from, to, toggle)
        Spry.Effect.DoSlide(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
    function MM_effectGrowShrink(targetElement, duration, from, to, toggle, referHeight, growFromCenter)
        Spry.Effect.DoGrow(targetElement, {duration: duration, from: from, to: to, toggle: toggle, referHeight: referHeight, growCenter: growFromCenter});
    //-->
    </script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <div id="pageContainer">
        <div id="adBanners">
            <div id="halfBanner"><a href="#" onClick="document.getElementById('adRollover').style.visibility='visible';"><img src="images/banner_half_1.jpg" alt="Half Banner" width="237" height="90" /></a></div>
            <div id="leaderboardBanner"><a href="#"><img src="images/banner_leaderboard_1.jpg" width="728" height="90" alt="Leaderboard Banner" /></a></div>
            <div class="clearFloats"></div>
        </div><!--div#adBanners-->
        <div id="mainHeader">
            <div id="homepageLink"><a href="index.html"><img src="images/spacer.gif" width="400" height="100" /></a></div>
            <ul id="MenuBar1" class="MenuBarHorizontal">
                <li><a href="feature.html">FEATURES</a></li>
                <li><a href="#">FASHION</a></li>
                <li><a href="calendar.html" class="on">CALENDAR</a></li>
                <li><a href="#">VIDEO</a></li>
                <li><a href="blog.html">BLOG</a></li>
            </ul>
        </div><!--div#mainHeader-->
        <div class="MasterDetail">
          <div class="DetailContainer" id="event" spry:detailregion="cal4">
            <div class="DetailPicture">{Picture}</div>
            <div class="DetailColumn DetailTitle">{What}</div>
            <div class="DetailColumn"><div class="DetailLabel">WHEN:</div> {When}
            </div>
            <div class="DetailColumn"><div class="DetailLabel">WHERE:</div> {Where}
            </div>
            <div class="DetailColumn">{Details}</div>
          </div>
          <div id="calHeader"><p><img src="images/calendar_hdr.gif" width="492" height="100" /></p></div>
          <div spry:region="cal4" class="MasterContainer" onclick="MM_effectAppearFade(this, 1000, 0, 100, false); MM_effectBlind('event', 1000, '0%', '100%', false);">
            <div class="MasterColumn" spry:repeat="cal4" spry:setrow="cal4" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected"><div class="MasterColumnPicture">{Thumb}</div>
              <div class="MasterColumnTitle">{What}</div>
              <div class="MasterColumnText"><div class="DetailLabel">WHEN:</div> {When}</div>
              <div class="MasterColumnText"><div class="DetailLabel">WHERE:</div> {Where}</div>
              <div style="clear:both"></div>
            </div>
          </div>
          <br style="clear:both" />
        </div>
    </div><!--div#pageContainer-->
    <div id="footer">
        <div class="text">Use of this site constitutes acceptance of our User Agreement and Privacy Policy. &copy; 2008 Adobe All rights reserved. The material on this site may not be reproduced, distributed, transmitted, cached, or otherwise used, except with the prior written permission of Adobe is a trademark owned by Adobe.</div>
    </div><!--div#footer-->
    <div id="adRollover" style="visibility: hidden;">
    <script language="javascript">
        if (AC_FL_RunContent == 0) {
            alert("This page requires AC_RunActiveContent.js.");
        } else {
            AC_FL_RunContent(
                'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
                'width', '536',
                'height', '479',
                'src', 'watch_ad',
                'quality', 'high',
                'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
                'align', 'middle',
                'play', 'true',
                'loop', 'true',
                'scale', 'showall',
                'wmode', 'transparent',
                'devicefont', 'false',
                'id', 'watch_ad',
                'bgcolor', '#ffffff',
                'name', 'watch_ad',
                'menu', 'true',
                'allowFullScreen', 'false',
                'allowScriptAccess','sameDomain',
                'movie', 'watch_ad',
                'salign', ''
                ); //end AC code
    </script>
    <noscript>
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="536" height="479" id="watch_ad" align="middle">
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="allowFullScreen" value="false" />
        <param name="movie" value="watch_ad.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />
        <param name="wmode" value="transparent" /><embed src="watch_ad.swf" quality="high" bgcolor="#ffffff" width="536" height="479" name="watch_ad" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
        </object>
    </noscript>
    </div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>

  • Help with Spry Detail Regions, XML Data Sets, for IMG gallery

    Hello,
    I'm working on a site for a friend of mine, a photo gallery. You can see the gallery here, it's a temporary one I'm working on
    http://www.emiliajozefa.com/a_index.html
    Here are some important parts of my code:
    //initially load these data sets. the function will be called by the links to update components later<script type="text/javascript">
         var intNumPhoto = 0;
         dsGallery = new Spry.Data.XMLDataSet("photofile.xml", "galleries/ride/photo");
         dsNav = new Spry.Data.XMLDataSet("photofile.xml", "galleries/ride");
         function updateSpryComponents(galleryDir){
              alert("updating spry components for " + galleryDir);
              intNumPhoto = 0;
              dsGallery = Spry.Data.XMLDataSet("photofile.xml", "galleries/" + galleryDir + "/photo");
              dsNav = Spry.Data.XMLDataSet("photofile.xml", "galleries/" + galleryDir);
              dsGallery.setCurrentRow(intNumPhoto);
              //document.getElementById('nav').innerHTML='<H1>'+enlarge.inp.value+'</H1>';
              document.getElementById('nav').innerHTML=
              "<span spry:detailregion = 'dsGallery'>
             <a href = 'javascript:' onclick = 'if(intNumPhoto > 0){intNumPhoto -= 1}; dsGallery.setCurrentRow(intNumPhoto);'>&lt;</a> {@id} / </span>
             <span spry:detailregion = 'dsNav'>{@numPhotos}
             <a href = 'javascript:' onclick = 'if(intNumPhoto < ({@numPhotos} - 1)){intNumPhoto += 1; }; dsGallery.setCurrentRow(intNumPhoto);'>&gt;</a>
             </span>";
    </script> <--- later ----><!-- SIDEBAR NAV. When link i clicked, set DataSet to the location of the new gallery -->
         <div id = "sideBarNav">
             <a href = "javascript:" onclick ='updateSpryComponents('ride');">Tannersville</a>
                <br />
              <a href = "javascript:" onclick = "updateSpryComponents('dive');">Dive</a>
            <br />
              <a href = "javascript:" onclick = "updateSpryComponents('poland');">Poland</a>
            <br />
              <a href = "javascript:" onclick = "updateSpryComponents('alaska');">Alaska</a>
        </div>
    </div>
    <div id = "content2">
         <!-- PHOTO CONTAINER I think I somehow need to refresh this section of the code to reload new data-->
         <div id = "fotoContainer" spry:detailregion="dsGallery"><img src = "photos/{@path}" width = "{@width}" height = "{@height}"/></div>
         <!-- IMAGE NAVIGATION -->
         <div id = "nav">       
             <span spry:detailregion = "dsGallery" id = "galSpan">
             <a href = "javascript:" onclick = "if(intNumPhoto > 0){intNumPhoto -= 1}; dsGallery.setCurrentRow(intNumPhoto);">&lt;</a> {@id} / </span>
             <span spry:detailregion = "dsNav" id = "navSpan">{@numPhotos}
             <a href = "javascript:" onclick = "if(intNumPhoto < ({@numPhotos} - 1)){intNumPhoto += 1; }; dsGallery.setCurrentRow(intNumPhoto);">&gt;</a>
             </span>
         </div>
    You could view source there to get the code. Here is what I believe is my problem
    I'm trying to automate the site so that when you click on one of the links on the left, without refreshing the page, the paths to the galleries xml file changes, and the spry Detail Regions (1 for the images, 1 for the navigation - left and right arrows). I think the problem is that once the link changes the set and calls my updateSpryComponenets() function, the detail regions need to be refreshed. I'm currently trying to solve this by dynamically rewriting the HTML thru .innterHTML, everytime I call updateSpryComponents().There may also be a problem in the Javascript function updateSpryControllers because if I put the alert after the spry calls, I never get the alert
    Thanks in advance for any help!

    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:(

  • How do I link a Spry data set with a detail region to a html web site?

    I have created a spry data set with a detail region. It works well. However, I would like to have a link from the detail region to another html web site. Can anyone help with the code? Below is the spry data set.
    <?xml version="1.0" encoding="utf-8"?>
    <books>
    <book>
    <title>The Advnentures of Crunchy and Munchy Squirrel: Field Nuts</title>
    <author>Levester Williams</author>
    <image>images/portfolio/tn_adventuresOfCrunchyAndMunchySquirrel.jpg</image>
    <description>This delightful book for young readers teaches the importance of obedience and always doing what you know is right.</description> I
    <weblink >www.crunchyandmunchy.com</weblink>
    </book>
    <book>
    <title>More Dirty Little Secrets</title>
    <author> Dr. Claud Anderson and Brant Anderson</author>
    <image>images/portfolio/tn_moreDirtyLittleSecrets.jpg</image>
    <description>In More Dirty Little Secrets, Dr. Claud Anderson and his son Brant Anderson, piece together little known facts about Black people, thier achievements, influence, involvement, tribulations and present them with wit and humor.</description>
    <weblink>http://powernomics.com/</weblink>
    </book>
    </books>

    Hi,
    In your html page, use the following notation:
    <a href="http://{weblink}" title="{weblink}" target="_blank">{weblink}</a>
    I hope this helps.
    Ben

  • Need to control page view to 20 from an html data source for a spry data repeating region

    </style>
    <script src="SpryAssetPan/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssetPan/SpryHTMLDataSet.js" type="text/javascript"></script>
    <script src="SpryAssetPan/SpryPagedView.js" type=”text/javascript”></script>
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.HTMLDataSet("wrapAround_master2.html", "wrap2", {distinctOnLoad: true, sortOnLoad: "Item", sortOrderOnLoad: "ascending"});
    var pv1 = new Spry.Data.PagedView( ds1 ,{pageSize: 20 });
    //-->
    </script>
    </head
    <body>
    <div id="wrapper">
      <div spry:region="ds1">
        <div id="repeatOne" spry:repeat="ds1">
          <p>{Photo_2}<br />
          {Item}</p>
        </div>
    Here you can find the file that I need to Create Paged View data set navigation
    http://www.hohmangraphics.com/masterProductGuide/WrapAround_art/joestest_2.html

    Thank you,
    With some adjustments it worked, see source code below,
    <script src="SpryAssetPan/SpryData.js" type="text/javascript"></script>
    <script src="SpryAssetPan/SpryHTMLDataSet.js" type="text/javascript"></script>
    <script language="JavaScript" type="text/javascript" src="SpryAssetPan/SpryPagedView.js"></script>
    <script language="JavaScript" type="text/javascript">
    var ds1 = new Spry.Data.HTMLDataSet("wrapAround_master2.html", "wrap2", {distinctOnLoad: true, sortOnLoad: "Item", sortOrderOnLoad: "ascending"});
    var pv1 = new Spry.Data.PagedView( ds1 ,{pageSize: 10});
    //-->
    </script>
    </head>
    <body>
    <div id="wrapper">
    <p>
      <input type="button" value="First" onclick="pv1.firstPage();" />
      <input type="button" value="Prev" onclick="pv1.previousPage();" />
      <input type="button" value="Next" onclick="pv1.nextPage();" />
      <input type="button" value="Last" onclick="pv1.lastPage();" />
      <br />
    </p>
    <div spry:region="pv1 ds1">
        <div id="repeatOne" spry:repeat="pv1">
          <p>{Photo_2}<br />
          {Item}</p>
        </div>

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

Maybe you are looking for