Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Filter spry table from repeater list

Community Beginner ,
Apr 25, 2008 Apr 25, 2008
Using Dreamweaver, I am looking to find out how to link a spry repeat list (Select Drop-Down) to a Spry table.
I have created a repeat list (Select Drop-Down) using a distinct filter on a field in my XML data base :
The XML database is:
var ds2 = new Spry.Data.XMLDataSet("Data/NetballDatafeed190401.xml", "NetballList/NetballProducts/SubType",{sortOnLoad:"SubType",sortOrderOnLoad:"as cending",distinctOnLoad:true});

The drop down list is created by
<div spry:region="ds2">
<select name="select" spry:repeatchildren="ds2">
<option value="{SubType}">{SubType}</option>
</select>
</div>

I have a table which I want to show only the values on the table where the subType that matches the value from the select list.

This data is populated by:
var ds1 = new Spry.Data.XMLDataSet("Data/NetballDatafeed190401.xml", "NetballList/NetballProducts",{sortOnLoad:"ProductPrice",sortOr derOnLoad:"ascending"});

and is created by
div spry:region="ds1">
<table>
<tr>
<th>ProductName</th>
<th>ProductPrice</th>
<th>ImageURL</th>
<th>SubType</th>
</tr>
<tr spry:repeat="ds1">
<td>{ProductName}</td>
<td>{ProductPrice}</td>
<td><img src="{ImageURL}"/></td>
<td>{SubType}</td>
</tr>
</table>
</div>


I believe that I need to create a spry:Choose statement in the drop down list which runs a function that filters the DS1 XML data.

I beleive that The function need to look like

var myFilterFunc = function(dataSet, row, rowNumber)
{
some funtion here that filters ds1 on {SubType}.......
}

I will then need to run ds1.filter(myFilterFunc);

Any pointers or examples most welcome.
TOPICS
Server side applications
434
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , May 01, 2008 May 01, 2008
to do the the spry:if="'statement" needs to be in the <tr> rows you want to filter on
Translate
Community Beginner ,
May 01, 2008 May 01, 2008
to do the the spry:if="'statement" needs to be in the <tr> rows you want to filter on
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 01, 2008 May 01, 2008
LATEST
to do the the spry:if="'statement" needs to be in the <tr> rows you want to filter on
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines