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

Thread Tools Display Modes
Old 02-13-2011, 01:36 AM   #1
woofy's Avatar
Join Date: Dec 2007
Location: San Diego
Posts: 57
Default How do I get Spry Collapsible panel to work inside Repeat Region

I am currently working on this problem, when placed in normally the only collapsible panel that works is the first one. So I used PHP and the record ID method to give each repeating panel a unique ID. However it doesn't work at all. I am posting the code I have for the entire region to see if anyone sees a problem or has a better solution.

PHP Code:
<?php do { ?>
        <br />
      <a name="com" id="com"></a>
    <?php if ($totalRows_rsCOMM 0) { // Show if recordset not empty ?>
        <table width="522" border="0" align="center" cellpadding="0" cellspacing="0" class="comtable">
            <td width="131" height="122" valign="bottom"><div align="center"><span class="comavatr"><a href="member_profile.php?MemberID=<?php echo $row_rsCOMM['cmmtr_ID']; ?>"><img src="http://www.comicracy.com/comimages/uploaded/<?php echo $row_rsCOMM['cmmtr_AVTR']; ?>" class="nobrderimages" /></a></span><br />
            <span class="gentext1">&nbsp;</span><a href="member_profile.php?MemberID=<?php echo $row_rsCOMM['cmmtr_ID']; ?>" class="gentext2"><?php echo $row_rsCOMM['cmmtr']; ?></a></div></td>
            <td width="419" valign="top" class="commmiddle">&quot; <span class="style7"><?php echo $row_rsCOMM['comment']; ?></span> &quot;</td>
         <script type="text/javascript">
var CollapsiblePanel<?php echo $row_rsCOMM['ID'];?> = new Spry.Widget.CollapsiblePanel("CollapsiblePanel<?php echo $row_rsCOMM['ID'];?>", {contentIsOpen:false});
         <div id="CollapsiblePanel<?php echo $row_rsCOMM['ID']; ?> class="CollapsiblePanel">
      <div class="CollapsiblePanelTab" tabindex="0">-REPLY to </div>
      <div class="CollapsiblePanelContent">
        <form id="form1" name="form1" method="post" action="">
          <table width="120" border="0" align="center" cellpadding="4" cellspacing="0">
              <td bgcolor="#000000"><table width="291" border="0" align="center" cellpadding="2" cellspacing="0">
                    <td width="287" bgcolor="#999999"><label>
                      <textarea name="comment2" id="comment2" cols="45" rows="5"  onkeypress="return taLimit(this)" onkeyup="return taCount(this,'myCounter')"  >@<?php echo $row_rsCOMM['cmmtr']; ?>-</textarea>
                      </label>                    </td>
                    <td bgcolor="#999999"><div align="center">
                        <div align="center" class="gentext1">You have <b class="style2"><span class="style3" id="myCounter2">500</span></b> characters remaining 
                          for your comment...</font></div>
                      <div align="center">
                          <input type="submit" name="REPLY" id="REPLY" value="REPLY" />
                          <input name="commenter2" type="hidden" id="commenter2" value="<?php echo $row_rsCOMMENT['first_name']; ?>" />
                          <input name="commenterID2" type="hidden" id="commenterID2" value="<?php echo $row_rsCOMMENT['ID']; ?>" />
                          <input name="USERID2" type="hidden" id="USERID2" value="<?php echo $row_rsMEMBRS['ID']; ?>" />
                          <input name="avatar2" type="hidden" id="avatar2" value="<?php echo $row_rsCOMMENT['avatar']; ?>" />
        <div align="center"></div>
        <?php // Show if recordset not empty ?>
    <?php } while ($row_rsCOMM mysql_fetch_assoc($rsCOMM)); ?>
The section of the above script that I am particularly focus on is <script type="text/javascript">
var CollapsiblePanel<?php echo $row_rsCOMM['ID'];?> = new Spry.Widget.CollapsiblePanel("CollapsiblePanel<?ph p echo $row_rsCOMM['ID'];?>", {contentIsOpen:false});

<div id="CollapsiblePanel<?php echo $row_rsCOMM['ID']; ?> class="CollapsiblePanel"> - For reference I learned this technique from this page: http://www.webdevforums.com/showthre...eating-regions
It looks like it works on the html pages, each panel has a different name based on the ID... but it still doesn't work.

If you want to see the page I am working on its

I must be missing something here because in theory this should work... any suggestions?
woofy is offline   Reply With Quote
Old 03-13-2011, 09:25 AM   #2
Join Date: Mar 2011
Posts: 1

Check out this page for the answer http://www.webdevforums.com/showthre...eating-regions
gbwebsols is offline   Reply With Quote

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 05:16 PM.

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