www.webdeveloper.com
Results 1 to 2 of 2

Thread: Spry Collapsible content working only on one instance

  1. #1
    Join Date
    Dec 2013
    Posts
    1

    Spry Collapsible content working only on one instance

    Hoping someone can give me some direction on how to fix this issue. I am using the Spry Collapsible to hide job requirements on my employment page. My employment page gets its data from my database. It can have 0 to 25 entries showing at any given time. I am using the collapsible to save on space. With in each collapsible is also grabbing information from my database. The very first widget that appears comes up just fine. The rest all stay open. Here is an exert of my current code.

    Code:
    <script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
    <script type="text/javascript">
    var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false, enableAnimation:false});
      </script>
    </head>
    
    <body>
    
      <table width="760" border="1" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
        <tr>
          <td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="10">
    
            <tr>
                  <td width="3%" align="left" valign="top" class="mission"><p>&nbsp;</p>
                    <br /></td>
              <td width="97%" rowspan="2" align="left" class="mission"><h3 align="center">Employment Opportunities
    			  </h3>
                    <?php do { ?>
                  <table width="690" border="0" align="center" cellpadding="5" cellspacing="0">
      <tr>
        <td width="281" align="left" valign="top" class="supertext">
          <?php if ($totalRows_Recordset1 >= 1) { // Show if recordset not empty ?>
          <span class="supertext1">Posted On</span> <?php echo $row_Recordset1['date']; ?>      <?php } // Show if recordset not empty ?>    </td>
        <td width="389" align="left" valign="top" class="supertext"> <?php if ($totalRows_Recordset1 == 0) { // Show if recordset empty ?>
      <p class="supertext style5">Sorry. Their are no job opportunities at this time. </p>
            <?php } // Show if recordset empty ?></td>
        </tr>
      <tr>
       <td align="left" valign="top" class="supertext"><?php if ($totalRows_Recordset1 >= 1) { // Show if recordset not empty ?><span class="style4 style6"><strong><u>JOB TITLE:</u></strong> </span><br /><strong><?php echo $row_Recordset1['title']; ?></strong>      <?php } // Show if recordset not empty ?>
     
       <div id="CollapsiblePanel1" class="CollapsiblePanel">
           <div class="CollapsiblePanelTab" tabindex="0">Requirements</div>
           <div class="CollapsiblePanelContent"><span class="style4"><strong><u>
          <?php if ($totalRows_Recordset1 >= 1) { // Show if recordset not empty ?>
          <span class="style6">JOB FUNCTION:</span></u> </strong><br></span><?php echo $row_Recordset1['function']; ?><span class="style4">
          <?php } // Show if recordset not empty ?>
          </span><br />
         <span class="style4"><strong><u>
          <?php if ($totalRows_Recordset1 >= 1) { // Show if recordset not empty ?>
          <span class="style6">QUALIFICATIONS:
          <br /></span></u> </strong></span><?php echo $row_Recordset1['qualify']; ?><span class="style4">
          <?php } // Show if recordset not empty ?>
          </span> 
          <p></p>   </div>
         </div></td>
        <td align="left" valign="top" class="supertext"><p><span class="style4"><strong><u>
          <?php if ($totalRows_Recordset1 >= 1) { // Show if recordset not empty ?>
          <span class="style6">      LOCATION:<br></span></u></strong></span><?php echo $row_Recordset1['location']; ?><span class="style4">
              <?php } // Show if recordset not empty ?>
            </span></td>
        </tr>
          <td rowspan="6" align="left" valign="top" class="supertext">
          <td align="left" valign="top" class="supertext"><span class="style4"><strong><u>
          <?php if ($totalRows_Recordset1 >= 1) { // Show if recordset not empty ?>
          <span class="style6">      Employment Type:</span></u></strong> </span><?php echo $row_Recordset1['status']; ?><span class="style4">
          <?php } // Show if recordset not empty ?>
          </span></td>
        </tr> 
        <td align="left" valign="top" class="supertext"><span class="style4"><strong><u>
          <?php if ($totalRows_Recordset1 >= 1) { // Show if recordset not empty ?>
          <span class="style6">      CONTACT NAME:</span></u></strong> </span><?php echo $row_Recordset1['cname']; ?><span class="style4">
          <?php } // Show if recordset not empty ?>
          </span></td>
        </tr>
       <tr>
        <td align="left" valign="top" class="supertext"><span class="style4"><strong><u>
          <?php if ($totalRows_Recordset1 >= 1) { // Show if recordset not empty ?>
          <span class="style6">CONTACT NUMBER:</span></u></strong> </span><?php echo $row_Recordset1['cphone']; ?><span class="style4">
          <?php } // Show if recordset not empty ?>
          </span></td>
          <tr>
        <tr>
         </tr>
       <tr>
        <td align="left" valign="top" class="supertext"><span class="style3"></span></td>
        </tr>
    </table> 
              <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?></td>
            </tr>
                
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td align="center" valign="top">&nbsp;</td>
                </tr>
          </table></td>
        </tr>
      </table>
    <script type="text/javascript">
    var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false, enableAnimation:false});
      </script>
    </body>
    </html>
    <?php
    mysql_free_result($Recordset1);
    ?>
    Thank in advance.

    here is my page live.

    http://www.simplythefinest.net/temp4...employment.htm

  2. #2
    Join Date
    Dec 2013
    Posts
    1
    I really appreciate that you took all this time to try and help us. I like your post. It is good to see you verbalize from the heart and clarity on this important subject can be easily observed.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles