Displaying an HTML Data Set on button click

I'm using the code from the
HTML
DATA Set Example
I have the code in a function and I want to have it display
in a div on the page when a user clicks a specific button.
I get this error message: "spry:region or spry:detailregion
attribute has no data set!"
This is my javascript:
function evalNames( )
var myArrayOfData = [
{ lastname: "Davis", firstname: "Kirk" },
{ lastname: "Miller", firstname: "James" },
{ lastname: "Wilson", firstname: "Alex" },
{ lastname: "Moore", firstname: "Albert" },
{ lastname: "Taylor", firstname: "Eric" },
{ lastname: "Anderson", firstname: "Vincent" },
{ lastname: "Thomas", firstname: "Anthony" },
{ lastname: "Lee", firstname: "John" },
{ lastname: "Smith", firstname: "Edward" },
{ lastname: "Johnson", firstname: "Neil" },
{ lastname: "Williams", firstname: "Steve" },
{ lastname: "Jones", firstname: "John" },
{ lastname: "Brown", firstname: "Joe" }
var hashTable = [];
for (var i = 0; i < myArrayOfData.length; i++)
myArrayOfData
.ds_RowID = i;
hashTable = myArrayOfData
var dsPeople = new Spry.Data.DataSet();
dsPeople.data = myArrayOfData;
dsPeople.dataHash = hashTable;
dsPeople.loadData();
var Output2 = "<input type="button" value="Sort By Last
Name" onclick="dsPeople.sort(['lastname', 'firstname'], 'toggle');"
/>";
Output2 +="<input type="button" value="Sort By First Name"
onclick="dsPeople.sort(['firstname', 'lastname'], 'toggle');"
/>";
Output2 +="<div spry:region="dsPeople">";
Output2 +="<table border="1">";
Output2
+="<tr><th>ds_RowID</th><th>Last
Name</th><th>First Name</th></tr>";
Output2 +="<tr
spry:repeat="dsPeople"><td>{ds_RowID}</td><td>{lastname}</td><td>{firstname}</td></tr>";
Output2 +="</table>";
Output2 +="</div>";
document.getElementById("nameResults").innerHTML = Output2;
I have a button on my page with the function evalNames() and
I have a div called "nameResults"
Is there an easier way to accomplish the same thing with the
Spry Framework? In theory should I be able to get this html data to
display in a div on the user's click of a button? Any suggestions
on making this work(it could just be a syntax error in the way my
var Output2 is written)?

Hello,
Based on the code above I discovered a number of problems:
1. The dsPeople DataSet has sense inside the function only so
the regions will not be able to use it. Instead you should move the
dsPeople DataSet declaration outside the function in global scope.
2. The code you try to inject into the innerHTML is not
valid. Inside double quotes all the double quotes should be escaped
or single quotes should be used.
3. The regions are instantiated only a single time on page
load so if you need to inject a new region into the page you'll
have to reinitialize the regions or the new region will not be
considered.
Based on your code above I change it a little bit to solve
the issues:
<script type="text/javascript">
var dsPeople = new Spry.Data.DataSet();
function evalNames( )
var myArrayOfData = [
{ lastname: "Davis", firstname: "Kirk" },
{ lastname: "Miller", firstname: "James" },
{ lastname: "Wilson", firstname: "Alex" },
{ lastname: "Moore", firstname: "Albert" },
{ lastname: "Taylor", firstname: "Eric" },
{ lastname: "Anderson", firstname: "Vincent" },
{ lastname: "Thomas", firstname: "Anthony" },
{ lastname: "Lee", firstname: "John" },
{ lastname: "Smith", firstname: "Edward" },
{ lastname: "Johnson", firstname: "Neil" },
{ lastname: "Williams", firstname: "Steve" },
{ lastname: "Jones", firstname: "John" },
{ lastname: "Brown", firstname: "Joe" }
var hashTable = [];
for (var i = 0; i < myArrayOfData.length; i++)
myArrayOfData.ds_RowID = i;
hashTable = myArrayOfData;
dsPeople.data = myArrayOfData;
dsPeople.dataHash = hashTable;
dsPeople.loadData();
var Output2 = "<input type='button' value='Sort By Last
Name' onclick='dsPeople.sort([\'lastname\', \'firstname\'],
\'toggle\');' />";
Output2 +="<input type='button' value='Sort By First
Name' onclick='dsPeople.sort([\'firstname\', \'lastname\'],
\'toggle\');' />";
Output2 +="<div spry:region='dsPeople'>";
Output2 +="<table border='1'>";
Output2
+="<tr><th>ds_RowID</th><th>Last
Name</th><th>First Name</th></tr>";
Output2 +="<tr
spry:repeat='dsPeople'><td>{ds_RowID}</td><td>{lastname}</td><td>{firstname}</td></tr>";
Output2 +="</table>";
Output2 +="</div>";
var el = document.getElementById("nameResults");
el.innerHTML = Output2;
Spry.Data.initRegions();
</script>
</head>
<body>
<div id="nameResults" style="border: 1px solid
red"></div>
<a href="#" onclick="evalNames(); return false;">Eval
Names</a>
</body>
A more easy way to achieve your goal is that the region to
already exists in page having either the visibility hidden or the
display: none CSS attributes set and the button only to change the
CSS property to display the region. The solution in this situation
will work better from point of view of performance as the
initRegions manual call will initialize again all the regions in
page.
Regards,
Cristian MARIN

Similar Messages

  • Using URL Parameters  to Control Data Regions - HTML Data set.

    Hello folks,
    I creating a website for company and I am using HTML data set for siderbar navigation and content. It works beautifully and content updates as it have to without page refreshing. But I need to have an unique url for each sidebar element, so I i found  this nice sample http://labs.adobe.com/technologies/spry/samples/data_region/DataWithURLParams.html?row=20.  I did analogy with that sample on my website and indeed all sidebar elements now have unique url - but here comes new problem. Now  when I click on the each sidebar element - page starts to refresh . Here is my website http://www.varpa.eu . What have i done wrong ? How can I get  it to load new content without refreshing the page and to have each sidebar element unique url ? Please mention that I am talking only about the sidebar , not the topbar. Please help me .
    Sorry for my bad english , it aint my native language.
    Thank you,
    Richard.

    Thank you for your response Ben.
    That code which you provided is the top bar code. The top bar buttons should refresh the page, because I haven't done a spry magic with them yet.
    I was talking about the sidebar where Company , History etc.  elements are standing. Sidebar code is:
    <div id="sidebarbuttonwrapper" spry:region="about_us" >
    <div spry:repeatchildren="about_us" spry:choose="choose" >
    <div  id="sidebarbutton"
    onclick="location.href='about.html?row={ds_RowID}';"
    spry:when="{ds_CurrentRowID} == {ds_RowID}" spry:setrow="about_us"  spry:selected="sidebarbuttonselected" spry:select="sidebarbuttonselected" spry:hover="sidebarbuttonhover">{button_name}</div>
    <div  id="sidebarbutton"
    onclick="location.href='about.html?row={ds_RowID}';" spry:default="spry:default"  spry:setrow="about_us" spry:hover="sidebarbuttonhover" spry:select="sidebarbuttonselected">
    {button_name}
    </div>
    </div> 
    </div>
    As you can see here http://www.varpa.eu/test/about.html?row=0 when I click on the sidebar elements page doesn't refresh , but the each sidebar element doesn't have unique URL.
    When I included the URL params as in that sample above, now in this case http://www.varpa.eu/about.html?row=0 each element have unique URL, but this URL change makes page to refresh.
    Any suggestion how to achieve that each sidebar element would have unique URL, and clicking on it would not cause page to refresh ?
    Richard.

  • Help! HTML Data set not working in IE (but in all other browsers)

    Hi there,
    I am totally desperate - I built a master/detail region page using a HTML data set.
    http://www.atcongress.com/programme/continuousLearningByName.html
    It works fine in Firefox/Safari/Chrome/Opera.
    Only IE7 and IE8 give me grief - displaying javascript errors; apparrently it is not able to bind the HTML data table to the data set:
    The IE Javascript Error Console displays "
    'Spry.Data.HTMLDataSet' ist Null oder kein Objekt
    This is in German but you'll get the idea I presume?! Translation would be something like
    'Spry.Data.HTMLDataSet' is Null or not an object"
    Anyway, the source HTML data table uses spry as well. This works fine on all browsers. Maybe because the HTML is on the same page?
    http://www.atcongress.com/programme/continuousLearningTable.html
    Any ideas? Do you need more info?
    Please help - the system needs to go out to test users any day now!
    Andreas
    This is the entire message from the IE8 javascript error console:
    Meldung: 'Spry.Data.HTMLDataSet' ist Null oder kein Objekt Zeile: 30 Zeichen: 1 Code: 0 URI: http://www.atcongress.com/programme/continuousLearningByName.html Meldung: 'Spry.Debug' ist Null oder kein Objekt Zeile: 961 Zeichen: 41 Code: 0 URI: http://www.atcongress.com/_spryAssets/SpryData.js Meldung: 'Spry.Data.initRegionsOnLoad' ist Null oder kein Objekt Zeile: 4855 Zeichen: 65 Code: 0 URI: http://www.atcongress.com/_spryAssets/SpryData.js

    More info on my trial & error process -  error still in this case...
    I cleaned up the code in both the problematic file and the source file that they validate fine now wit the W3C validator:
    http://validator.w3.org/check?uri=http://www.atcongress.com/programme/continuousLearningBy Name.html&charset=(detect+automatically)&doctype=Inline&ss=1&outline=1&group=0&No200=1&ver bose=1&st=1&user-agent=W3C_Validator/1.1
    Data source file:
    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.atcongress.com%2Fprogramme%2Fcontinuous LearningTable.html&charset=%28detect+automatically%29&doctype=Inline&ss=1&outline=1&group= 0&No200=1&verbose=1&st=1&user-agent=W3C_Validator%2F1.1
    I'd also like to mention again that the source html file also contains an HTML data set and spry code. No problems there.
    In  order to make sure that is not a problem of referencing external data I  also tried copying and pasting the source data table into the  problematic file so that it can be used as a local data source. Still  the same.
    Apparently the probem is the master/detail region part.  The working HTML spry file uses a standard HTML table whereas my  problematic one uses a master/detail region
    ANY help would be greatly appreciated!

  • HTML Data Sets on Website

    Hi,
    I recently started using dreamweaver to create a website for school. I uploaded the home page here:https://netfiles.uiuc.edu/rbasava2/www/home.htm
    Don't worry about the messed up video.
    I put up the texts for the links up on the side. What I'm trying to do is when the link is clicked on the side, I only want to reload the box in the middle which will contain all the content. I looked into this a little and I think I have to use an html data set, but I wasn't able to figure out how to set this up or how to link it up to the links so it makes it so only the box reloads?

    Here are a couple of links for HTML data sets:
    http://www.adobe.com/devnet/dreamweaver/articles/spry_creating_html_data_set.html
    http://www.adobe.com/designcenter/dreamweaver/articles/lrvid4047_dw.html
    Another technique you might want to look into is Spry Tabbed Panels:
    (this first reference is a little technical, but a pretty good overview) http://livedocs.adobe.com/en_US/Spry/SDG/help.html?content=WS6FED301A-59A1-45ce-BC1F-11074 3A27FE9.html
    http://help.adobe.com/en_US/Dreamweaver/10.0_Using/WSC21A9606-FECA-431c-A617-AE65C4BDB8C5. html
    A nice reference for Spry in general is here: http://labs.adobe.com/technologies/spry/samples/
    Have fun...
    Beth

  • STATIC "HTML Data Set Photo Gallery" with CAPTIONS

    Because of search engines and validation I would really like to use the STATIC "HTML Data Set Photo Gallery" http://labs.adobe.com/technologies/spry/demos/gallery_pe/static/china.html.
    But I definitely need captions for the Photos. I found possibilities to add them via XML, but not for the HTML-Version.
    As far as I got I think I have to edit this function from "gallery_hds.js" and add some RegEx, to extract caption text.
    function PhotosFilter(ds, row, rowIndex)
        var tnStr = row.thumbimg;
        if (tnStr)
            row.path = tnStr.replace(/.*<a[^>]*href="?([^"]*)"?.*/i, "$1");
            row.thumbpath = tnStr.replace(/.*<img[^>]*src="?([^"]*)"?.*/i, "$1");
        return row;
    In the following rows within the html-document
    <span class="thumbnail"><a href="../../gallery/galleries/paris/images/paris_02.jpg"><img src="../../gallery/galleries/paris/thumbnails/paris_02.jpg" alt="paris_02.jpg" /></a></span>
    I would insert text before the closing span-tag (or before the closing a-tag?) - like so
    <span class="thumbnail"><a href="../../gallery/galleries/paris/images/paris_02.jpg"><img src="../../gallery/galleries/paris/thumbnails/paris_02.jpg" alt="paris_02.jpg" /></a>Here is some HTML Text</span>
    This text must be extracted via RegEx - similar to the rows within the if-Statement of the upper mentioned function "PhotosFilter". But here my RegEx-knowledge is definitely to short!
    Thank you very much in advance for any help or suggestion.
    Angela Fengler

    Because of search engines and validation I would really like to use the STATIC "HTML Data Set Photo Gallery" http://labs.adobe.com/technologies/spry/demos/gallery_pe/static/china.html.
    But I definitely need captions for the Photos. I found possibilities to add them via XML, but not for the HTML-Version.
    As far as I got I think I have to edit this function from "gallery_hds.js" and add some RegEx, to extract caption text.
    function PhotosFilter(ds, row, rowIndex)
        var tnStr = row.thumbimg;
        if (tnStr)
            row.path = tnStr.replace(/.*<a[^>]*href="?([^"]*)"?.*/i, "$1");
            row.thumbpath = tnStr.replace(/.*<img[^>]*src="?([^"]*)"?.*/i, "$1");
        return row;
    In the following rows within the html-document
    <span class="thumbnail"><a href="../../gallery/galleries/paris/images/paris_02.jpg"><img src="../../gallery/galleries/paris/thumbnails/paris_02.jpg" alt="paris_02.jpg" /></a></span>
    I would insert text before the closing span-tag (or before the closing a-tag?) - like so
    <span class="thumbnail"><a href="../../gallery/galleries/paris/images/paris_02.jpg"><img src="../../gallery/galleries/paris/thumbnails/paris_02.jpg" alt="paris_02.jpg" /></a>Here is some HTML Text</span>
    This text must be extracted via RegEx - similar to the rows within the if-Statement of the upper mentioned function "PhotosFilter". But here my RegEx-knowledge is definitely to short!
    Thank you very much in advance for any help or suggestion.
    Angela Fengler

  • Spry Photo Gallery Html Data Set InLine Content

    To whom that may know.
    I, the confused have wasted several long hours trying to
    understand how adobe did this.
    http://labs.adobe.com/technologies/spry/demos/gallery_pe/static_hd/china.html
    Ok, before that you think I am a total idiot. Please look at
    the code. I have made this page several time using program like
    photoshop, fireworks and dreamweaver....all using xml. This page
    uses html data set that is on the page. Which after looking and
    many example...all the example consist of a data table. I have
    looked at the javascript for many files in the code. I even
    downloaded their actual js files to see if they change something. I
    am assuming that they are using css to place the data to read...I
    just don't see where the "ds1" statement comes into play when you
    look at this code. I thank you all in advance for your time and
    expert opinions.
    P.S. My sample page does show all the thumbnails and links
    and after I downloaded their css it does show the background to be
    black. But nothing else shows.

    To whom that may know.
    I, the confused have wasted several long hours trying to
    understand how adobe did this.
    http://labs.adobe.com/technologies/spry/demos/gallery_pe/static_hd/china.html
    Ok, before that you think I am a total idiot. Please look at
    the code. I have made this page several time using program like
    photoshop, fireworks and dreamweaver....all using xml. This page
    uses html data set that is on the page. Which after looking and
    many example...all the example consist of a data table. I have
    looked at the javascript for many files in the code. I even
    downloaded their actual js files to see if they change something. I
    am assuming that they are using css to place the data to read...I
    just don't see where the "ds1" statement comes into play when you
    look at this code. I thank you all in advance for your time and
    expert opinions.
    P.S. My sample page does show all the thumbnails and links
    and after I downloaded their css it does show the background to be
    black. But nothing else shows.

  • Involve more than one HTML data set.

    Hello,
    I am building a website and using spry data sets for it. I need to have opportunity to involve more than one data set. In this sample found exactly what I need - http://livedocs.adobe.com/en_US/Spry/SDG/help.html?content=WSFC985AA5-C5E9-4266-ACE0-62299 A0E0B70.html but in my case I am using HTML data set not the XML. In all browsers except IE all seems to work fine, but I get an Spry debugger error - Spry.Data.HTMLDataSet: 'garden2' is not a valid element ID. 'garden2' is a id for table that I am using as HTML data source. It seems that dreamweaver ain't too supporting this thing with HTML as in that sample, because when i try to open this Data set in bindings panel I get an error -  Invalid URL schema. My idea is that , one HTML data set contains the name list of the products categories and unique url for each product name , and this unique url shows path for other HTML data set for each product, which contains product list for each category. Link to the part of my website where I am trying to do this stuff http://www.varpa.eu/garden.html?row=0  .
    So how can I get rid of the Spry debugger error and make it work in IE ?
    Thank you,
    Richard.

    I found  why page wasn't working on IE,I had not just closed one <tr> tag in HTML data set file. But spry debugger error still occurs in Opera , Safari , Chrome and Dreamweaver live view and I can't still open the second second data set in bindings panel.To hide this <div> with spry debugger error, I just attached style to ir visibility : hidden; . But it's still very weird though that adobe isn't supporting this option for HTML data set, but supports only for XML , isn't it ?
    Richard.

  • Google index external HTML data sets?

    I know one of the workarounds to have Google properly index
    dynamic content is to use HTML data sets, but I'm unclear about one
    thing. Does this only work if you have the HTML data set table on
    the same page you use it with, or does it also work with external
    HTML data sets?
    For instance, will Google have a problem indexing if I use a
    external HTML data set like:
    <script type="text/javascript">
    <!--
    var educationLinks = new
    Spry.Data.HTMLDataSet("links/educationLinks.htm",
    "educationLinks");
    //-->
    </script>
    <div spry:region="educationLinks" id="linksContainer"
    class="SpryHiddenRegion">
    <ul spry:repeatchildren="educationLinks"
    class="unorderedLinkList">
    <li><a href="{url}"
    target="_blank">{name}</a> - {description}</li>
    </ul>
    <!-- end #linksContainer -->
    </div>

    I'm doing the same exact thing using external HTML data sets
    instead of XML. It is true that spiders will not index the external
    page based on the Spry data you noted. My solution will be to
    create a sitemap.xml page and submit it to the search engines. That
    sitemap.xml file will contain all the pages in your site and the
    spiders will use it as a central point to crawl all of those pages
    specified within. So, I will just include my externally referenced
    files in the sitemap.xml file.
    Checkout
    http://www.sitemap.org for more
    information on that.

  • Binding HTML Data Sets

    In the Applications/Bindings tab I see where I can bind an
    xml file to my html page - how do I do the same with an HTML data
    set. I have the set working, but have to manually code the
    variables into the site. I would love to use the Bindings tab.
    Thanks - Don

    Here are a couple of links for HTML data sets:
    http://www.adobe.com/devnet/dreamweaver/articles/spry_creating_html_data_set.html
    http://www.adobe.com/designcenter/dreamweaver/articles/lrvid4047_dw.html
    Another technique you might want to look into is Spry Tabbed Panels:
    (this first reference is a little technical, but a pretty good overview) http://livedocs.adobe.com/en_US/Spry/SDG/help.html?content=WS6FED301A-59A1-45ce-BC1F-11074 3A27FE9.html
    http://help.adobe.com/en_US/Dreamweaver/10.0_Using/WSC21A9606-FECA-431c-A617-AE65C4BDB8C5. html
    A nice reference for Spry in general is here: http://labs.adobe.com/technologies/spry/samples/
    Have fun...
    Beth

  • How to display an HTML data which contains images in CR

    Hi Experts,
    I have a HTML file which contains images and text. I will store all this data in to the database as binary data(SQL server 2008). How can I display the whole  data in report.
    Thanks in advance,
    Salah

    hello all,
    most times when HTML is stored in a database there are many tags that will not work. the tags that will work are very basic and limited to the formatting types that you can do within a Text Object...so not much.
    if you need all of the HTML from a database interpreted, you need to activate pass-through html on your system. then if you put the field into a formula (one line in height) the HTML should be properly displayed. for more info on activating pass-through html see the beginning of the Users Guide for webelements that is in the main download [here|Crystal Reports webElements].
    please note that there are some major limitations in this method:
    1) you cannot print the html displayed when using the print button on the crystal reports toolbar as it will show up as text...you can try the browsers print functionality to see if that works for you
    2) you can not export the report and see the html displayed...it will show up as text
    3) pagination may not work for you...i.e. if you have an especially long section of html in your database, the page may not break where you want it to
    best of luck,
    jamie

  • SPRY image display problem with data sets!   "

    Dreamweaver CS4
    I really want to use a Spry Data set created with an HTML table (versus XML)
    I've done this step by step several times(after changing local sites and images) and every time I preview the results, each one of my images has a "> in front of it.
    I don't know how to get rid of this "> character!
    I've provided two HTML files used to create this:
    TABLE.html is the source
    SpryTable.html is the actual file pulling TABLE.html for data
    The images are images, I'm not going to provide them since anyone can add a random image just to see if the "> appears.
    I'm not going to include the java files since dreamweaver generates them on their own.
    Thanks!

    Jason, the best place for us to analyze your files is from a server. Have you uploaded them?
    The second best place is in a set of site files...including the HTML table, the display file that uses the HTML table, the CSS and javascript file.
    Without those, it is pretty nigh impossible to work this problem!
    I suspect the errant character appears somewhere in your data table, but based on what you have shown us, it's hard to say.
    When you defined the dataset, did you indicate that the column containing the images is type="HTML"? If you have left it as type="string", it is interpreting the > as text.
    Beth

  • Limiting the number of returned rows in an HTML data set

    I have a data set that is displayed and sorted by a hidden 'hits' field that is updated based on popularity.  My table has about 40 entries, but I want only the first 10 results to show.
    How would I go about doing this?
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
         Spry.Utils.setInnerHTML = function(ele, str, preventScripts){Spry.$(ele).innerHTML = str;};
    </script>
    <script src="SpryAssets/SpryHTMLDataSet.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    var PrankDialerLibrary = new Spry.Data.HTMLDataSet("SpryAssets/library.html", "pdLibrary", {sortOnLoad: "hits", sortOrderOnLoad: "descending"});
    PrankDialerLibrary.setColumnType("preview", "html");
    PrankDialerLibrary.setColumnType("info", "html");
    PrankDialerLibrary.setColumnType("filename", "html");
    //-->
    </script> --- <div class="MasterDetail">
         <div spry:region="PrankDialerLibrary" class="MasterContainer">
              <div class="MasterColumn" spry:repeat="PrankDialerLibrary" spry:setrow="PrankDialerLibrary" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected" align="left">{preview}  {name}</div>
              </div>
              <div spry:detailregion="PrankDialerLibrary" class="DetailContainer">
                   <div class="DetailColumn">{info}</div>
                   <div class="DetailColumn">{filename}</div>
              </div>
              <br style="clear:both" />      </div></div>
    Thanks!

    Ansered my own question.  Simply adding
    spry:test="{ds_RowNumber} < 10" 
    to the MasterColumn div did the trick!

  • HTML Data Set not created?

    I have created a very basic page to test (and learn) about dynamic spry regions, but the data set constructor does not seem to be instantiating the data set.  At this point I'm keeping it very simple just to see how things work.
    Per the Spry Framework documentation, I moved the framework include files into my site and I created a table in a separate .html file containing only the table, fotm_db_frag.html, as a fragment.  The table is simple; opening it in DW CS3 shows it's well formed with a header row and data rows.  It's id tag is set to "dsFotm"
    Here's the entire page file so far:
    <!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 the Spry libraries-->
    <script type="text/javascript" src="includes/SpryData.js"></script>
    <script type="text/javascript" src="includes/SpryHTMLDataSet.js"></script>
    <!--Create a data set object-->
    <script type="text/javascript">
    var dsFotmdb = new Spry.Data.HTMLDataSet("fotm_db_frag.html", "dsFotm");</script>
    dsFotmdb.setColumnType("Date", "date")
    </head>
    <body>
    <div id="container">Content for  id "container" Goes Here</div>
    </body>
    </html>
    At this point, I select the content of the container div and attempt to use visual aids to insert a spry region, but the dialog that pops up says that no data sets have been defined.  I tried saving the file, I looked at Testing server options (left this set at None), I looked in the help to see if there was anything I needed to do in order for the script to run ... but I couldn't find anything that would make the new constructor instantiate data set dsFotmdb.
    Help please !!!
    BTW:  before starting all this, I downloaded Spry 1.6.1 Framework and updated my copy of DW CS3 with the spry updater (that all seemed to work).

    Try making a simple XML file and Dataset to see if that works
    Call this Test.xml
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    - <!-- Just a Text -->
    - <CATALOG>
    - <CD>
    <TITLE>Empire Burlesque</TITLE>
    <ARTIST>Bob Dylan</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>Columbia</COMPANY>
    <PRICE>10.90</PRICE>
    <YEAR>1985</YEAR>
    </CD>
    - <CD>
    <TITLE>Hide your heart</TITLE>
    <ARTIST>Bonnie Tyler</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>CBS Records</COMPANY>
    <PRICE>9.90</PRICE>
    <YEAR>1988</YEAR>
    </CD>
    - <CD>
    <TITLE>Greatest Hits</TITLE>
    <ARTIST>Dolly Parton</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>RCA</COMPANY>
    <PRICE>9.90</PRICE>
    <YEAR>1982</YEAR>
    </CD>
    - <CD>
    <TITLE>Still got the blues</TITLE>
    <ARTIST>Gary Moore</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>Virgin records</COMPANY>
    <PRICE>10.20</PRICE>
    <YEAR>1990</YEAR>
    </CD>
    - <CD>
    <TITLE>Eros</TITLE>
    <ARTIST>Eros Ramazzotti</ARTIST>
    <COUNTRY>EU</COUNTRY>
    <COMPANY>BMG</COMPANY>
    <PRICE>9.90</PRICE>
    <YEAR>1997</YEAR>
    </CD>
    - <CD>
    <TITLE>One night only</TITLE>
    <ARTIST>Bee Gees</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>Polydor</COMPANY>
    <PRICE>10.90</PRICE>
    <YEAR>1998</YEAR>
    </CD>
    - <CD>
    <TITLE>Sylvias Mother</TITLE>
    <ARTIST>Dr.Hook</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>CBS</COMPANY>
    <PRICE>8.10</PRICE>
    <YEAR>1973</YEAR>
    </CD>
    - <CD>
    <TITLE>Maggie May</TITLE>
    <ARTIST>Rod Stewart</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>Pickwick</COMPANY>
    <PRICE>8.50</PRICE>
    <YEAR>1990</YEAR>
    </CD>
    - <CD>
    <TITLE>Romanza</TITLE>
    <ARTIST>Andrea Bocelli</ARTIST>
    <COUNTRY>EU</COUNTRY>
    <COMPANY>Polydor</COMPANY>
    <PRICE>10.80</PRICE>
    <YEAR>1996</YEAR>
    </CD>
    - <CD>
    <TITLE>When a man loves a woman</TITLE>
    <ARTIST>Percy Sledge</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>Atlantic</COMPANY>
    <PRICE>8.70</PRICE>
    <YEAR>1987</YEAR>
    </CD>
    - <CD>
    <TITLE>Black angel</TITLE>
    <ARTIST>Savage Rose</ARTIST>
    <COUNTRY>EU</COUNTRY>
    <COMPANY>Mega</COMPANY>
    <PRICE>10.90</PRICE>
    <YEAR>1995</YEAR>
    </CD>
    - <CD>
    <TITLE>1999 Grammy Nominees</TITLE>
    <ARTIST>Many</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>Grammy</COMPANY>
    <PRICE>10.20</PRICE>
    <YEAR>1999</YEAR>
    </CD>
    - <CD>
    <TITLE>For the good times</TITLE>
    <ARTIST>Kenny Rogers</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>Mucik Master</COMPANY>
    <PRICE>8.70</PRICE>
    <YEAR>1995</YEAR>
    </CD>
    - <CD>
    <TITLE>Big Willie style</TITLE>
    <ARTIST>Will Smith</ARTIST>
    <COUNTRY>USA</COUNTRY>
    <COMPANY>Columbia</COMPANY>
    <PRICE>9.90</PRICE>
    <YEAR>1997</YEAR>
    </CD>
    - <CD>
    <TITLE>Tupelo Honey</TITLE>
    <ARTIST>Van Morrison</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>Polydor</COMPANY>
    <PRICE>8.20</PRICE>
    <YEAR>1971</YEAR>
    </CD>
    - <CD>
    <TITLE>Soulsville</TITLE>
    <ARTIST>Jorn Hoel</ARTIST>
    <COUNTRY>Norway</COUNTRY>
    <COMPANY>WEA</COMPANY>
    <PRICE>7.90</PRICE>
    <YEAR>1996</YEAR>
    </CD>
    - <CD>
    <TITLE>The very best of</TITLE>
    <ARTIST>Cat Stevens</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>Island</COMPANY>
    <PRICE>8.90</PRICE>
    <YEAR>1990</YEAR>
    </CD>
    - <CD>
    <TITLE>Stop</TITLE>
    <ARTIST>Sam Brown</ARTIST>
    <COUNTRY>UK</COUNTRY>
    <COMPANY>A and M</COMPANY>
    <PRICE>8.90</PRICE>
    <YEAR>1988</YEAR>
    </CD>
    - <CD>
    <TITLE>Bridge of Spies</TITLE>
    <ARTIST>T'Pau</ARTIST>
    <

  • Jsp data display as a result of a button click

    i have a textfield in a jsp along with a SEARCH button. the search button searches the database for the existence of the value entered in the textfield.
    how should i code so that at the click of search button the dbase is searched (for the entered value in textfield).
    the dbase should be searchedonly after the click of search button.
    i wud also like to display the searched value as a table data next to the button. how shud i code it. i coded search logic using a function which is in a javascript. but the function is executing before the press of the search button.
    i'm new to JSPs. please help.. thanks.

    It's covered by every decent JSP/Servlet book/tutorial. With other words, this is too trivial and it proves that you really know nothing about it at all. I then highly recommend to take time first to go through a decent book/tutorial. This forum is to help others with technical coding problems, not to spoonfeed others who cannot write code.
    To start with HTML: [http://www.w3schools.com/html/].
    A nice HTML book: [http://www.amazon.com/HTML-Dummies-Ed-Tittel/dp/076450214X].
    To start with JSP/Servlet: [http://java.sun.com/javaee/5/docs/tutorial/doc/ (part II chapters 1-8)].
    A nice JSP/Servlet book: [http://www.amazon.com/Head-First-Servlets-JSP-Certified/dp/0596516681].
    It boils down to having a HTML <form>, <input type="text"> and <input type="submit"> in the JSP page and havinig a Servlet with necessary code in the doPost() method which obtains the request parameter, queries the database, stores the result in the request scope and forwards the request to a JSP for display -which on its turn uses JSTL c:forEach to iterate over the list of results.
    Good luck. If you ever have a technical JSP/JSTL question/problem, you're welcome to ask here.

  • Saving data on custom button click in list tile

    Hi,
    I have a list tile, on which certain records are being populated based on the flag "Confirm_flag=0".
    When I click on 'confirm All' button which is on the same tile, the 'Confirm_flag' has to be updated to '1' for all records.
    I added the code the following code on the 'Confirm All' click
            anchoronthetile.bo.MakeDirty(True)   -- to make 'save' button enable
            mcore_beforeSave(true)                   -- calling the event for saving
    After that I added the code on mcore_beforeSave()
    anchoronthetile.bo.save()
    But this code not giving the proper out and How to set the "Confirm_Flag" value to 1?
    Please help me out
    thanx & regds
    Mateen

    Hi Mohammed,
    As you have a BusinessCollection, thus you need to loop throught the businesscollection collecting each record into similar type of business object and then update the values.
    e.g
    DIM Businessobject as new objectOfTypeBusinesscollection
    BusinessCollection = Tile.anchor.Bo
    For each businessobject in businesscollection
    businessobject.confirm_flag = '1'
    next
    This is a psuedocode and you can work upon the same to furnish it.
    Best Regards,
    Pratik Patel
    <b>Reward with Points!</b>

Maybe you are looking for