logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Spry
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 04-24-2008, 08:19 PM   #1
Crippolini
 
Join Date: Apr 2008
Posts: 3
Default Filter a spry table on the field selected from a repeater list

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

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

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

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

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


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

I beleive that The function need to look like

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

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

Any pointers or examples most welcome.
Crippolini is offline   Reply With Quote
Old 08-09-2011, 06:02 AM   #2
Awon
 
Join Date: Jul 2011
Posts: 1
Default Filter Data from Table Using Select Option

Hello There

I come to know you about Filter Data from Table Using Select Option.

I have a url which can help you.

Click Here : http://www.raiseitsolutions.com/forum/viewtopic.php?f=27&t=152

I hope it is enough for you.

Thank You

AWON
Awon is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:21 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com