Spry User Guide - Support - Adobe
Spry User Guide - Support - Adobe
Spry User Guide - Support - Adobe
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<br />
<br />
<br />
Dynamic Region Example<br />
<br />
<br />
<br />
var dsPhotos = new <strong>Spry</strong>.Data.XMLDataSet("/photos.php?galleryid=2000",<br />
"/gallery/photos/photo");<br />
<br />
<br />
<br />
<br />
<br />
{@path}<br />
<br />
<br />
<br />
<br />
To make an element conditional, add an spry:if attribute to the element with a value that is a JavaScript expression<br />
that returns zero or nonzero values. A nonzero value that the JavaScript expression returns results in the element<br />
being written to the final output.<br />
If you need an if-else construct, use the "spry:choose" construct. The following example uses the spry:choose<br />
construct to color every other div:<br />
<br />
<br />
<br />
<br />
Dynamic Region Example<br />
<br />
<br />
<br />
var dsPhotos = new <strong>Spry</strong>.Data.XMLDataSet("/photos.php?galleryid=2000",<br />
"/gallery/photos/photo");<br />
<br />
<br />
<br />
<br />
<br />
{@path}<br />
Path was not defined.<br />
Unexpected value for path!<br />
<br />
<br />
<br />
<br />
SPRY<br />
<strong>User</strong> <strong>Guide</strong><br />
132