Question
Collapsible spry - dynamic
I try to make a "collapsible spry widget" repeating dynamical
(by a recordset (I tried also with spry data-xml))
get the same problem, the first collaps work fine but the other are open and do not work,
Does anyone know if it is possible to do so ?
thanks
1- recordset:
<?php do { ?>
<div id="CollapsiblePanel1" class="CollapsiblePanel">
<div class="CollapsiblePanelTab" tabindex="0"><b><?php echo $row_master1artist['prenom_artist']; ?><?php echo $row_master1artist['nom_artist']; ?></b></div>
<div class="CollapsiblePanelContent">
<?php
if ($totalRows_master1artist>0) {
$nested_query_detail2liste = str_replace("123456789", $row_master1artist['id_art'], $query_detail2liste);
mysql_select_db($database_connection);
$detail2liste = mysql_query($nested_query_detail2liste, $connection) or die(mysql_error());
$row_detail2liste = mysql_fetch_assoc($detail2liste);
$totalRows_detail2liste = mysql_num_rows($detail2liste);
$nested_sw = false;
if (isset($row_detail2liste) && is_array($row_detail2liste)) {
do { //Nested repeat
?>
<tr>
<td><span class="style1">Gallerie:</span> <?php echo $row_detail2liste['name_gall']; ?>-<br />
<span class="style2">Description:</span> <?php echo $row_detail2liste['text_gall']; ?><br />
<span class="style2">example link:</span> <?php echo $row_detail2liste['link_gall']; ?><br /></td>
</tr>
<?php
} while ($row_detail2liste = mysql_fetch_assoc($detail2liste)); //Nested move next
}
}
?>
</div>
</div>
<?php } while ($row_master1artist = mysql_fetch_assoc($master1artist)); ?><p> </p>
<script type="text/javascript">
<!--
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false});
//-->
</script>
-------------
Spry data:
<div spry:region="ds1">
<div spry:repeat="ds1">
<div id="CollapsiblePanel1" class="CollapsiblePanel">
<div class="CollapsiblePanelTab" tabindex="0">{prenom_artist}</div>
<div class="CollapsiblePanelContent">Content</div>
<script type="text/javascript">
<!--
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1");
//-->
</script>
</div>
</div>
</div>
get the same problem, the first collaps work fine but the other are open and do not work,
Does anyone know if it is possible to do so ?
thanks
1- recordset:
<?php do { ?>
<div id="CollapsiblePanel1" class="CollapsiblePanel">
<div class="CollapsiblePanelTab" tabindex="0"><b><?php echo $row_master1artist['prenom_artist']; ?><?php echo $row_master1artist['nom_artist']; ?></b></div>
<div class="CollapsiblePanelContent">
<?php
if ($totalRows_master1artist>0) {
$nested_query_detail2liste = str_replace("123456789", $row_master1artist['id_art'], $query_detail2liste);
mysql_select_db($database_connection);
$detail2liste = mysql_query($nested_query_detail2liste, $connection) or die(mysql_error());
$row_detail2liste = mysql_fetch_assoc($detail2liste);
$totalRows_detail2liste = mysql_num_rows($detail2liste);
$nested_sw = false;
if (isset($row_detail2liste) && is_array($row_detail2liste)) {
do { //Nested repeat
?>
<tr>
<td><span class="style1">Gallerie:</span> <?php echo $row_detail2liste['name_gall']; ?>-<br />
<span class="style2">Description:</span> <?php echo $row_detail2liste['text_gall']; ?><br />
<span class="style2">example link:</span> <?php echo $row_detail2liste['link_gall']; ?><br /></td>
</tr>
<?php
} while ($row_detail2liste = mysql_fetch_assoc($detail2liste)); //Nested move next
}
}
?>
</div>
</div>
<?php } while ($row_master1artist = mysql_fetch_assoc($master1artist)); ?><p> </p>
<script type="text/javascript">
<!--
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false});
//-->
</script>
-------------
Spry data:
<div spry:region="ds1">
<div spry:repeat="ds1">
<div id="CollapsiblePanel1" class="CollapsiblePanel">
<div class="CollapsiblePanelTab" tabindex="0">{prenom_artist}</div>
<div class="CollapsiblePanelContent">Content</div>
<script type="text/javascript">
<!--
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1");
//-->
</script>
</div>
</div>
</div>
