Spry Validation in Spry Detail Region

I am trying to pre-populate an "update" data form using a
spry detail region. Basically a list of users is displayed on the
left, and the detail in a tab on the right. A second "edit" tab
displays a form that is populated with data from the spry dataset
using a detail region (just as the first detail tab). However, the
spry validations within the detail region do not work.
Download
this zip.
Thanks for looking.

Hi jmortimer,
What you need to do is trigger the constructors for your
validation widgets every time the region updates. To do this, you
need to either move the constructor calls into your region, *or*
call the constructors from an onPostUpdate observer on your region.
To see an example of this, look here:
http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample2.html
Just a note ... don't move the constructor for your tabbed
panel into the region. Leave it where it is today.
--== Kin ==--

Similar Messages

  • Spry Table: size of detail regions

    I have a table with 5 items. each item is linked to a
    different image (the detail region).
    I want to have different sizes of detail regions : so when I
    click on item 1 of the table, the detail region (image) that opens
    has a X size, and when I click on item 2 of the table, the detail
    region (another image) that opens has a Y size. etc...
    I am using an image placeholder to place the image of the
    detail region: it may be the source of the problem. But if I don't
    use an image placeholder, the image/detail region does not show.
    Many thanks in advance

    Hi..
    For the Tabs... you can set the property to layout as matrix layout and set the property of the tabs 'stretchedHorizontally' & 'stretchedVertically' = x
    for the table... select the columns in the table and check this property "resizable" if this one is checked.. remove that and try it.. so that your table will not get resized based on the DB data...
    Hope this will help you
    Regards
    Raja

  • Spry Validation in a Spry Detail Region

    am trying to pre-populate an "update" data form using a spry
    detail region. Basically a list of users is displayed on the left,
    and the detail in a tab on the right. A second "edit" tab displays
    a form that is populated with data from the spry dataset using a
    detail region (just as the first detail tab). However, the spry
    validations within the detail region do not work.
    Download
    this zip.
    Thanks for any help.

    Hi jmortimer,
    What you need to do is trigger the constructors for your
    validation widgets every time the region updates. To do this, you
    need to either move the constructor calls into your region, *or*
    call the constructors from an onPostUpdate observer on your region.
    To see an example of this, look here:
    http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample2.html
    Just a note ... don't move the constructor for your tabbed
    panel into the region. Leave it where it is today.
    --== Kin ==--

  • Detail Region as TOC for captivate (.swf) files

    Hi All,
    Not sure how to explain this, but i will do my best. I didnt like the TOC/Aggregator for CP 5. Thinking maybe to use Spry data using the Detail Region sample. I thought it would be simple to just combine the Detail Region code with the publsihed .swf and .htm code. But not sure what im doing wrong or if this is even possible to do. I was experimenting just using the exact same code and xml for Detail Region sample and modifying it a bit. See below...
    Appreciate the Help! Thank you.
    XML:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <products>
         <product>
              <name>Adobe Photoshop CS2</name>
              <category>Digital Imaging</category>
              <boximage>images/photoshop.gif</boximage>
              <bkgimage>M_1.swf</bkgimage>
              <descheader>The professional standard in desktop digital imaging</descheader>
              <desc>Adobe&#174; Photoshop&#174; CS2 software, the professional image-editing standard and leader of the Photoshop digital imaging line, delivers more of what you crave. Groundbreaking creative tools help you achieve extraordinary results. Unprecedented adaptability lets you custom-fit Photoshop to the way you work. And with more efficient editing, processing, and file handling, there's no slowing you down.</desc>
              <features></features>
         </product>
         <product>
              <name>Adobe Illustrator CS2</name>
              <category>Print Publishing</category>
              <boximage>images/illustrator.gif</boximage>
              <bkgimage>M_2.swf</bkgimage>
              <descheader>Vector graphics reinvented</descheader>
              <desc>Adobe&#174; Illustrator&#174; CS2 software gives you new creative freedom that lets you realize your ideas quickly and powerfully. Instantly convert bitmaps to vector artwork and paint more intuitively. Save time with intelligent palettes and optimized workspaces. Plus, tight integration with other software allows you to produce extraordinary graphics for print, video, the web, and mobile devices.</desc>
              <features></features>
         </product>
         <product>
              <name>Adobe InDesign CS2</name>
              <category>Print Publishing</category>
              <boximage>images/indesign.gif</boximage>
              <bkgimage>M_3.swf</bkgimage>
              <descheader>A new standard in professional layout and design</descheader>
              <desc>Join the growing ranks of creative professionals discovering new levels of creative freedom and productivity using Adobe&#174; InDesign&#174; CS2 software. Tightly integrated with the Adobe applications you use most, InDesign CS2 delivers faster production workflows and a more fluid creative environment for designing professional layouts with sophisticated graphics and typography.</desc>
              <features></features>
         </product>
         <product>
              <name>Adobe GoLive CS2</name>
              <category>Web Publishing</category>
              <boximage>images/golive.gif</boximage>
              <bkgimage>M_4_1.swf</bkgimage>
              <descheader>Professional, standards-based Web and mobile authoring</descheader>
              <desc>Adobe&#174; GoLive&#174; CS2 software lets you unlock the power of CSS with intuitive visual tools such as prebuilt CSS objects that you can drag and drop to build sophisticated sites. Jump-start your designs by easily converting Adobe InDesign&#174; layouts into Web pages. Or, design Web and mobile content in an advanced, standards-based coding environment.</desc>
              <features></features>
         </product>
         <product>
              <name>Adobe Dreamweaver 8</name>
              <category>Web Publishing</category>
              <boximage>images/dreamweaver.gif</boximage>
              <bkgimage>M_5_1.swf</bkgimage>
              <descheader>Dreamweaver 8 is the industry-leading web development tool, enabling users to efficiently design, develop and maintain standards-based websites and applications.</descheader>
              <desc>With Dreamweaver 8, web developers go from start to finish, creating and maintaining basic websites to advanced applications that support best practices and the latest technologies.</desc>
              <features></features>
         </product>
         <product>
              <name>Adobe Flash 8 Professional</name>
              <category>Web Publishing</category>
              <boximage>images/flash_pro.gif</boximage>
              <bkgimage>M_6_1.swf</bkgimage>
              <descheader>Introducing Macromedia's biggest Flash release to date.</descheader>
              <desc>Flash&#174; Professional 8 is the industry's most advanced authoring environment for creating interactive websites, digital experiences and mobile content. With Flash Professional 8, creative professionals design and author interactive content rich with video, graphics, and animation for truly unique, engaging websites, presentations or mobile content.</desc>
              <features></features>
         </product>
    </products>
    HTML 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=iso-8859-1" />
    <title>Detail Region and Effects Sample</title>
    <link href="files/samples.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    .product {
         cursor: pointer;
    .hover {
         background-color: #FFFFCC;
    .selected {
         background-color: #CCCCCC;
    #description {
         opacity: 0;
         filter: alpha(opacity=0);
         background-color: white;
    </style>
    <script src="files/xpath.js" type="text/javascript"></script>
    <script src="files/SpryData.js" type="text/javascript"></script>
    <script src="files/SpryEffects.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    var ds1 = new Spry.Data.XMLDataSet("files/products.xml", "products/product");
    var gEffectInProgress = null;
    var gPendingSetRowIDRequest = -1;
    function fadeInContent(notificationType, notifier, data)
         if (notificationType != "onPostUpdate")
              return;
         var effect = new Spry.Effect.Fade('description', { to: 100, from: 0, duration: 500, finish: function() {
              // The region is now showing. Process any pending row change request.
              gEffectInProgress = null;
              if (gPendingSetRowIDRequest >= 0)
                   var id = gPendingSetRowIDRequest;
                   gPendingSetRowIDRequest = -1;
                   fadeOutContentThenSetRow(id);
         effect.start();
    Spry.Data.Region.addObserver('description', fadeInContent);
    function fadeOutContentThenSetRow(rowID)
         if (gEffectInProgress)
              gPendingSetRowIDRequest = rowID;
              return;
         if (rowID == ds1.getCurrentRowID())
              return;
         gEffectInProgress = new Spry.Effect.Fade('description', { to: 0, from: 100, duration: 500, finish: function() {
              ds1.setCurrentRow(rowID);
         gEffectInProgress.start();
    //-->
    </script>
    <script src="files/standard.js" type="text/javascript"></script>
    </head>
    <body>
    <h3>Detail Region and Effects Sample</h3>
    <hr />
    <table width="100%" border="0">
         <tr>
              <td width="21%">
    <ul spry:region="ds1" spry:repeatchildren="ds1">
                        <li class="product" onclick="fadeOutContentThenSetRow('{ds_RowID}');" spry:select="selected" spry:hover="hover">{name}</li>
                </ul>
              </td>
           <td width="79%">
       <div id="description" spry:detailregion=" ds1">
      <div id="CaptivateContent">
       </div>
       <script type="text/javascript">
          var so = new SWFObject("{bkgimage}", "Captivate", "100%", "100%", "8", "#CCCCCC");
             so.addParam("quality", "high");
             so.addParam("name", "Captivate");
             so.addParam("id", "Captivate");
             so.addParam("wmode", "opaque");
             so.addParam("bgcolor","#F1F4F5");
             so.addParam("menu", "false");
             so.addParam("allowScriptAccess", "always");
             so.addVariable("variable1", "value1");
             so.setAttribute("redirectUrl", "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash");
             so.write("CaptivateContent");
       </script>
            <script type="text/javascript">
          document.getElementById('Captivate').focus();
          document.Captivate.focus();
       </script>    
          </div>
          </td>
      </tr>
    </table>
    </body>
    </html>
    Message was edited by: drodax

    Hi,
    I think you will need a third party convertor - a quick
    google sent me to this one
    http://www.winavi.com/swf-to-avi.htm
    which is free.

  • How Do I: Bind a YUI Calendar Widget to a Spry Master Detail Region?

    Hello All,
    Does anyone know how to bind a YUI Calendar widget to a Spry
    master detail region? I have the dataset, yui calendar inserted but
    no clue how to bind the two so my dataset populates the calendar
    (Highlights dates that have a event) and when a date in the
    calendar is clicked it shows in the details section.
    I have found a tidbit or two via google but they don't deal
    with the new yui cs4
    widget. I have seen some video on adove tv that touches on
    inserting the yui calendar into a spry dataset but not how to bind
    the two together...
    Any thoughts on this would be greatly appreciated.

    You have to write some code that sets up a select callback on
    the YUI side of things, and then set the current row of the data
    set that matches that date.
    Something like this:
    var cal1 = new YAHOO.widget.Calendar("cal1","YUICal1");
    cal1.render();
    cal1.selectEvent.subscribe(function(type, args, obj)
    // Get the selected date string from cal1.
    var selectedDate = cal1.getSelectedDates()[0].getDate();
    // Find the first row in the data set that has the
    // selected date in it's "date" column.
    var row = ds1.findRowsWithColumnValues({"date":
    selectedDate}, true);
    // If we have a matching row, make it the current row for
    the data set.
    if (row)
    ds1.setCurrentRow(row.ds_RowID);
    }, cal, true);
    --== Kin ==--

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

  • Spry Validation within Editable Region of Template

    Hello all,
    Spry Validation Field is not working on this page where the
    code is within an editable region of a template based page:
    http://www.nprducati.com/newsite/service.html
    The same exact code works on a "normal" HTML page.
    Anyone else encounter this or has any ideas why it's failing?
    Rich

    Spry validation would not be affected by being located within
    a template
    editable region, since editable regions are only indicated by
    the use of
    HTML comment tags, i.e., meaningless to a browser.
    Most likely the problem is the link here -
    <script src="SpryAssets/SpryValidationTextField.js"
    type="text/javascript"></script>
    It appears that you have not made the link properly in the
    Template file,
    since the corresponding link for the menu is this -
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1",
    {imgRight:"../SpryAssets/SpryMenuBarRightHover.gif"});
    You might also want to take care of these errors -
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.nprducati.com%2Fnewsite%2Fser vice.html
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Multistrada1100" <[email protected]> wrote
    in message
    news:flegqo$h60$[email protected]..
    > Hello all,
    >
    > Spry Validation Field is not working on this page where
    the code is within
    > an
    > editable region of a template based page:
    >
    >
    http://www.nprducati.com/newsite/service.html
    >
    > The same exact code works on a "normal" HTML page.
    >
    > Anyone else encounter this or has any ideas why it's
    failing?
    >
    > Rich
    >

  • 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

  • Displaying rendered HTML text in spry detail region

    Hi,
    I have just started to play around with DW CS3 & spry and
    love them!
    I have a Master/Detail spry going from my database, but am
    having a problem displaying the detail the way I need it. The mySQL
    field is a BLOB for some HTML formatted text (I get the text
    elsewhere using a Xinha textarea edit widget and load the the
    formatted HTML text into my db). For example, my string is
    "<h2>this test</h2><strong>xyz</strong>"
    which is loaded into my db. I am using the dreamweaver ADDT export
    XML functionality to generate my spry master/detail region.
    My detail region is displaying the correct html associated
    with the selected master table entry, but it's with the HTML tags,
    not rendered as HTML (I don't want to see
    <h2>title</h2>; I'd like to see title with <H2>
    formatting).
    It's much like what I think a RSS feed would be, but can't
    find a way just to get the html to render because I don't have the
    files externally to source an iframe or anything. (I tried a XLS
    fragment transformation, just putting the detail record field that
    I want in an XLS file, but that didn't do anything).
    Any kind of guidance, hint, point and laugh but then tell me,
    would be greatly appreciated. I also posted at first at ADDT and
    then General Dreamweaver because I didn't locate this forum in the
    Forum topic list, so when I did find this I thought this is
    obviously where I should have first posted - sorry if anyone has
    also been surfing around. Thanks so much so any info.

    Hi Don,
    Thanks so much for responding. I actually did do that, but it
    seems like I might be doing it in the wrong place. I tried it in
    the .js that I have in my header:
    var dsList = new Spry.Data.XMLDataSet("./export.php",
    "theSpecials/special",{sortOnLoad:"rating",sortOrderOnLoad:"ascending",distinctOnLoad:tru e});
    dsList.setColumnType("detail", "html");
    which didn't do it. I also tried it right in my detail
    display area:
    <div style="overflow:hidden; width: 400px;"
    spry:detailregion="dsList">
    <div> <!-- nested div for spry effect -->
    <div id="detailDisplay" style="width:380px; "> <!--
    spry:content="{detail}"> -->
    <script
    type="text/javascript">dsList.setColumnType("detail","html");</script>{dsList::detail}
    <!-- echo '{dsList::detail}' ; ?> -->
    </div> <!-- detailDisplay -->
    </div> <!-- outter div for spry effect -->
    <!-- spry detail region -->
    </div>
    Excuse the inline ugliness, will clean it up when it's
    functional. But that doesn't seem to do it either. I am storing
    that particular field as a blob in the mysql database, but I
    already tried making that a VARCHAR which had no effect either.
    Thanks so much for for the suggestion! Any other gems that I
    can try?
    Liz

  • Adding detail regions to Spry Menu bar

    I'm trying to create a Spry horizontal menu bar so that when you click on the drop-down menu item it brings up detail regions pertaining to each drop down title. If I create a Spry data set and choose Master Detail Layout, the menu it creates is static, and I would like the list only to appear (drop down) when you rollover the menu bar title. Is there any way to do this? I'm very new to Dreamweaver so any help would be greatly appreciated.
    –Bernie

    I have not figured out how to make the background images
    different in the menu and sub-menus but to add a background image
    in general you must double click on the css rule
    ul.menubarhorizontal ul under the css style bar "all rules" and
    select background and then you can place a background image.
    Depending on the image and how you would like it to display you
    will want to alter the following options: repeat, attachment(not
    really necessary for a menu bar image), horizontal and vertical
    position.
    I solved my menu bar issue by making the graphic long enough
    to fill both the menu bar area of 118px (it just cuts off the
    extra) and sub-menu area of 235px .
    Here is a link to the site I am working on :
    www.ssctestsite.org

  • Spry validation textfield - required condition

    Can anyone help me with the Spry validation text field...
    I have a form for which I wish to be able to use for 1 to 4
    users to fill in, if at the beginning of the form they select 2
    users then I wish to then change the 'isRequired:false' to
    'isRequired:true' so that the details for user 2 then become
    required before the form submits... Is there a way I can do this?
    Thanks

    ...plz help me..

  • Spry Validation Error in Internet Explorer

    Hi,
    I have a PHP form with Spry Validation for Textfields and Selction.
    The init part in the HTML form looks like this:
          var spryradioanrede = new Spry.Widget.ValidationRadio("spryradioanrede", {isRequired:true, validateOn:["change,blur"]});
           var sprytextfieldvorname = new Spry.Widget.ValidationTextField("sprytextfieldvorname", "none", {isRequired:true,  validateOn:["change,blur"]});
           var sprytextfieldnachname = new Spry.Widget.ValidationTextField("sprytextfieldnachname", "none", {isRequired:true,  validateOn:["change,blur"]});
           var sprytextfieldstrasse = new Spry.Widget.ValidationTextField("sprytextfieldstrasse", "none", {isRequired:true,  validateOn:["change,blur"]});
           var sprytextfieldhausnummer = new Spry.Widget.ValidationTextField("sprytextfieldhausnummer", "none", {  validateOn:["change,blur"]});
           var sprytextfieldplz = new Spry.Widget.ValidationTextField("sprytextfieldplz", "none", {useCharacterMasking:true, pattern:"00000", validateOn:["change,blur"]});
           var sprytextfieldort = new Spry.Widget.ValidationTextField("sprytextfieldort", "none", {isRequired:true,  validateOn:["change,blur"]});
           var sprytextfieldemail = new Spry.Widget.ValidationTextField("sprytextfieldemail", "email", { validateOn:["change,blur"]});
           var sprytextfieldvorwahl = new Spry.Widget.ValidationTextField("sprytextfieldvorwahl", "none", {validation:isNumeric,isRequired:false,  validateOn:["change,blur"]});
           var sprytextfieldrufnummer = new Spry.Widget.ValidationTextField("sprytextfieldrufnummer", "none", {validation:isNumeric, isRequired:false,  validateOn:["change,blur"]});
           var sprytextfieldausweisnummer = new Spry.Widget.ValidationTextField("sprytextfieldausweisnummer", "none", {validation:isValididentitycard,  validateOn:["blur"]});
           var sprytextfieldstaatsangehoerigkeit = new Spry.Widget.ValidationTextField("sprytextfieldstaatsangehoerigkeit", "none", {isRequired:true,  validateOn:["change,blur"]});             
           var spryselectfieldtag = new Spry.Widget.ValidationSelect("spryselectfieldtag", {isRequired:true, validateOn:["change,blur"]});
           var spryselectfieldmonat = new Spry.Widget.ValidationSelect("spryselectfieldmonat", {isRequired:true, validateOn:["change,blur"]});
           var spryselectfieldjahr = new Spry.Widget.ValidationSelect("spryselectfieldjahr", {isRequired:true, validateOn:["change,blur"]});
    When loading the page an error in Internet Explorer 8 occures:
    Error Details from IE:
    Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; MDDR; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
    Zeitstempel: Mon, 31 Aug 2009 08:54:38 UTC
    Meldung: 'this.input.defaultValue' ist Null oder kein Objekt
    Zeile: 1734
    Zeichen: 2
    Code: 0
    URI: http://.../SpryAssets/SpryValidationTextField.js
    When loading the page the first time it's not a big problem. But when the users enters some unvalid data the page lodes again and in the onload section from the body the function validateall is startet.
    function validateall()    {
                    status = 0;
                    status += spryradioanrede.validate();
                    status += sprytextfieldvorname.validate();
                    status += sprytextfieldnachname.validate();
                    status += sprytextfieldstrasse.validate();
                    status += sprytextfieldstrasse.validate();
                    status += sprytextfieldplz.validate();
                    status += sprytextfieldort.validate();
                    status += sprytextfieldemail.validate()
                    status += sprytextfieldvorwahl.validate();
                    status += sprytextfieldrufnummer.validate();
                    status += sprytextfieldausweisnummer.validate();
                    status += sprytextfieldstaatsangehoerigkeit.validate();
                    status += spryselectfieldtag.validate();
                    status += spryselectfieldmonat.validate();
                    status += spryselectfieldjahr.validate();
                    if (status < 15) {
                        return 0;
                    } else {
                        return 1;
    The error occurs again and the validation is not yet done. Which means, that the fields with problems will not be marked. When entering the field afterward and changing or blur everything works ok and the field is marked in red. Only the onload is not working.
    Any ideas, what the problem is?
    Thank
    Michael

    It seems to be an Error in Spry,
    Open the SpryValidationTextField.js
    find:
    Spry.Widget.ValidationTextField.prototype.reset = function() {
         this.removeHint();
         this.oldValue = this.input.defaultValue;
         this.resetClasses();
         if (Spry.is.ie) {
              //this will fire the onpropertychange event right after the className changed on the container element
              //IE6 will not fire the first onpropertychange on an input type text after a onreset handler if inside that handler the className of one of the elements inside the form has been changed
              //to reproduce: change the className of one of the elements inside the form from within the onreset handler; then the onpropertychange does not fire the first time
              this.input.forceFireFirstOnPropertyChange = true;
              this.input.removeAttribute("forceFireFirstOnPropertyChange");
         var self = this;
         setTimeout(function() {self.putHint();}, 10);
    and replace with:
    Spry.Widget.ValidationTextField.prototype.reset = function() {
         this.removeHint();
         this.oldValue = this.input && this.input.defaultValue ? this.input.defaultValue : "";
         this.resetClasses();
         if (Spry.is.ie) {
              //this will fire the onpropertychange event right after the className changed on the container element
              //IE6 will not fire the first onpropertychange on an input type text after a onreset handler if inside that handler the className of one of the elements inside the form has been changed
              //to reproduce: change the className of one of the elements inside the form from within the onreset handler; then the onpropertychange does not fire the first time
              this.input.forceFireFirstOnPropertyChange = true;
              this.input.removeAttribute("forceFireFirstOnPropertyChange");
         var self = this;
         setTimeout(function() {self.putHint();}, 10);
    To see if it helps

  • Spry Validation and ADDT DatePicker Widget

    I have a number of text fields which I applied Spry
    Validation to and set them to "required". These function correctly
    until I add a ADDT DatePicker widget to the form. Now the
    validation doesn't work.

    Hi Gabriele,
    technically speaking, ADDT and the Spry framework have about nothing in common, and you´re going to stumble across many compatibility-related issues when trying to use them together.
    Does anyone have a solution??
    any regular user who´d like to provide a solution to this, would have to be a pretty skilled programmer and would have to know the "technical details" of both ADDT and SPRY very well to be of help -- I don´t think that you´ll find many folks here who are capable to do that.
    However, why not making the date field required in ADDT ?
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Filtering A Dataset Using the Spry Validation Select Widget

    Given the code below, how can I filter the rows in the
    ds_BestConvertingByCategory dataset (in the spry:repeat area) that
    match the product category (prodcat_id) selected in the Spry
    Validation select widget?
    // product categories table: columns - prodcat_id,
    prodcat_desc
    var ds_ProductCategories = new
    Spry.Data.XMLDataSet("category_qry2xml.php", "product/category",
    {useCache:false});
    // has prodcat_id column
    var ds_BestConvertingByCategory = new
    Spry.Data.XMLDataSet("product_qry2xml.php", "special/deals[type =
    'Best Converting']", {useCache:false});
    // Spry regions inside a TabbedPanel
    <div class="TabbedPanelsContent">
    <form id="formOffersByCategory" class="frmsprysel"
    name="formOffersByCategory" method="post" action="">
    <strong>Select a Product Category: </strong>
    <span spry:region="dsProductCategories"
    id="spryselectProductByCategory">
    <select spry:repeatchildren="ds_ProductCategories"
    name="offersByCategory" id="offersByCategory"
    onChange="ds_ProductCategories.setCurrentRowNumber(this.selectedIndex);">
    <option spry:if="{ds_RowNumber} == {ds_CurrentRowNumber}"
    value="{prodcat_id}"
    selected="selected">{prodcat_desc}</option>
    <option spry:if="{ds_RowNumber} != {ds_CurrentRowNumber}"
    value="{prodcat_id}">{prodcat_desc}</option>
    </select>
    </span>
    </form>
    <div id="offersbycategory"
    spry:region="ds_BestConvertingByCategory"
    class="SpryHiddenRegion">
    <table id="offersByCategoryTbl" width="100%">
    <tr class="colhdr">
    <th width="50%">Offer</th>
    <th width="50%">Code</th>
    </tr>
    <tr spry:repeat="ds_BestConvertingByCategory">
    <td width="50%">{displaytext}</td>
    <td width="50%">{offer_code}</td>
    </tr>
    </table>
    </div>
    </div>
    // Spry validation select widget
    var spryselectProductByCategory = new
    Spry.Widget.ValidationSelect("spryselectProductByCategory");

    Hi flipone01,
    To do this, make your region depend on both
    ds_ProductCategories and ds_BestConvertingByCategory, then use the
    spry:test attribute in conjunction with spry:repeat to weed out
    items that don't have the same product id:
    <div id="offersbycategory"
    spry:region="ds_BestConvertingByCategory ds_ProductCategories"
    <tr spry:repeat="ds_BestConvertingByCategory"
    spry:test="{ds_BestConvertingByCategory::productcat_id} ==
    {ds_ProductCategories::productcat_id}">
    </div>
    Remember that if you make a region depend on more than one
    data set, you need to switch to using fully qualified data
    references as the example above does (using the :: notation). If
    you don't do that the data references default to the first data set
    in the spry:region attribute.
    --== Kin ==--

  • Spry widget / php recordsets / repeatable regions

    okay this deals with the spry collapsiblepanel widget in cs3.
    I'm testing the ability to create a news feed with this feature
    paired with a php recordset. My issue involves the repeated widgets
    not working like the first one. I know it probably is a result of
    the region thats being repeated / the collapsible panel. Look at
    the code and this test site that i've worked up.
    test website the
    code is below...i've commented out the start and end of the
    repeated region.

    PHP, being a serverside code, will refresh the page each time there is a request made to the server. JavaScript (and Spry), being a client side code, does not have to send requests to the server and therefore allows you to change the data without a page refresh.
    Having said that, you need to have a Spry dataset in your Accordion panel.
    By following these steps, you will be well on your way to achieving what you want.
    Retrieve your data using PHP and place it in an HTML-table or similar outside of the Accordion panel
    Create a SpryHTMLDataSet based on the HTML-table
    Use the data from the Spry dataset to create a master/detail region in your Accordion panel
    Just a few questions before I go into details.
    Have you set up a connection to a database, thus be able to retrieve the data?
    Why do you need an Accordion panel to show your data?
    Have you got an online URL so that we can follow your code? Otherwise please include your code in your post.
    Please come back here with your answers and we shall try to help you on your way
    Ben

Maybe you are looking for