Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.
-
miarte #1
How to spry addEventListener?
How can I display all the items when selecting a category (menu)?
At the moment is showing only the first item from the dsData set. in the <div
spry:detailregion="dsData"> when selecting from <div
spry:region="dsCategory">{category}</div>.
My goal is to display all the items by category when I click on the <div
spry:region="dsCategory">{category}</div>
// I have a product xml file.
<items>
<item type="math">
<category>Math</category>
<subject>Division</subject>
<grade type="math">Grade 6 - 8</grade>
<image>images/math_icon.png</image>
</item>
<item type="math">
<category>Math</category>
<subject>Multiplication</subject>
<grade type="math">Grade 4</grade>
<image>images/math_icon.png</image>
</item>
<item type="math">
<category>Math</category>
<subject>Addition</subject>
<grade type="math">Grade 3</grade>
<image>images/math_icon.png</image>
</item>
<item type="science">
<category>Science</category>
<subject>Life Science</subject>
<grade type="science">Grade 6 - 8</grade>
<image>images/science_icon.png</image>
</item>
...
</items>
<script type="text/javascript">
// I used this to get tall the data:
var dsData = new Spry.Data.XMLDataSet("included/products.xml", "items/item");
// I used this to get the categories:
// Used distinct category
var dsCategory = new
Spry.Data.XMLDataSet("included/products.xml","items/item/category",{distinctOnLo
ad: true, distinctFieldsOnLoad:['category']});
</script>
// Display the categories:
// Using onClick event to set the current row
<div spry:region="dsCategory">
<ul id="MenuBar1" class="MenuBarVertical">
<li id="selecteCat"
onclick="dsData.setCurrentRow('{ds_RowID}');"
spry:repeat="dsCategory"><span>{category}</span></li>
</ul>
</div>
// Display the selected items base on the category selection:
<div spry:detailregion="dsData">
{category}
{subject}
{grade}
<img src="{image}" border="0" />
</div>
Do I need to create and Event Listener to do this?
Or there is any other way to pass the value onClick event to the data and
display it by category???
~Cheers
miarte Guest
-
Where is Spry ZIP???
Working from the spry help area, and following the steps... 1. Download and unzip the Spry ZIP file from the Adobe Labs website to your hard... -
Spry Bar Help
Alright guys I am kind of a newbie when it comes to dreamweaver (I was always a fan of golive because of its simplicity). Anyways I am running... -
Combine Spry Tabbed Panel and Spry HTML Panel
I would like to maintain the presentation of the tabbed panel and utilize its ability to load content from a Spry Dataset, but I would also like to... -
sending arguments to addEventListener
I'm trying to create a wizard based application. I'm having trouble sending arguments to my "back" and "next" buttons using addEventListener. ... -
Button and addEventListener
Okay, It looks to me like I need to lie to flash to make this work. Can someone confirm that I am not being incredibly stupid here: Scenario... -
danilocelic AdobeCommunityExpert #2
Re: How to spry addEventListener?
miarte wrote:
Try asking your question in the Spry forum where you'll get a more focused group of viewers for your question :> Do I need to create and Event Listener to do this?
> Or there is any other way to pass the value onClick event to the data and
> display it by category???
[url]http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=72&catid=602[/url]
--
Danilo Celic
| [url]http://blog.extensioneering.com/[/url]
| WebAssist Extensioneer
| Adobe Community Expert
danilocelic AdobeCommunityExpert Guest



Reply With Quote

