Results 1 to 5 of 5

Thread: "toggleAll" does not work

  1. #1
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default "toggleAll" does not work

    Hi Guys,

    Here is my deal. I can not get nClick="toggleAll(this,'containerDiv') to work: cab anyone help?
    HTML Code:
    <table border="0" cellpadding="5" cellspacing="5" width="522">
            <tbody>
              <tr>
                <td valign="top">&nbsp;              </td>
              </tr>
              <tr>
                <td width="50%" valign="top">
                  <div align="left">
                    <p>
                      <input name="checkbox" type="checkbox" onClick="toggleAll(this,'containerDiv')">
                      <span class="story">Check the box to view all sections. </span></p>
                    <p><strong><a href="javascript:toggleDiv('maestro', 1)"><img src="product_files/bullet.gif" width="14" height="14" border="0">The Maestro Suite </a><br>
                        </strong> </p>
                  </div>
                  <div style="display:none ;" id="maestro" class="indent">
                    <table width="100%" border="0" cellspacing="0">
                      <tr>
                        <td><blockquote>
                            <p class="style4">Service Dispatch <br>
                        Processing Manufacturing <br>
                        Apparel <br>
                        Remote Order Delivery, Remote Sales <br>
                        Rental, Equipment Rental <br>
                        International Trade <br>
                        Slab and Floor<br>
                        <a href="http://www.iigservices.com/enh/maestro.htm">Read More... </a></p>
                        </blockquote></td>
                      </tr>
                    </table>
                  </div>
                  <span class="storya"><a href="javascript:toggleDiv('sales', 1)"><strong><br>
                  <img src="product_files/bullet.gif" width="14" height="14" border="0">Sales &amp; Customer Mgmt.</strong></a></span><strong><span class="style4"> </span></strong><span class="style4"><br>
                  </span>
                  <div style="display: none ;" id="sales" class="indent">
                    <table width="100%" border="0" cellspacing="0">
                      <tr>
                        <td><blockquote>
                            <p class="style4">Customer Credit Management<br>
                        Customer Open Sales Detail<br>
                        Auto-Email Notification<br>
                        Duplicate Customer Tracking<br>
                        Discount on Purchase History<br>
                        Sales Order to Purchase Order Link<br>
                        Auto Next Customer Number<br>
                        Bill to Customer<br>
                        Sales Order Import<br>
                        Commission Processing<br>
                        Add Territory Code to Ship To<br>
                        Invoice History Sub-Sets<br>
                        Purchase Order Import<br>
                        <a href="http://www.iigservices.com/enh/salescustm_mgmt.htm">Read More...</a></p>
                        </blockquote></td>
                      </tr>
                    </table>
                  </div>
                  <strong><a href="javascript:toggleDiv('dist', 1)"><br>
                  <img src="product_files/bullet.gif" width="14" height="14" border="0">Advanced Distribution</a></strong> <br>
                  <div style="display:none ;" id="dist" class="">
                    <table width="100%" border="0" cellspacing="0">
                      <tr>
                        <td><blockquote>
                            <blockquote>
                              <p><span class="style4">Warehouse Management Systems (RF) <br>
                                </span><span class="style4">Shipping Automation <br>
                          Multi-Bin UPC Processing <br>
                          Advanced Landed Cost <br>
                          Multi-Warehouse Location Processing <br>
                          Bill of Lading <br>
                          Associate Items Processing <br>
                          Lot/ Serial Distribution in Sales Order <br>
                          Fast Production Entry <br>
                          Component Track <br>
                          Master/Slave Items <br>
                          Release Back Order <br>
                          Redemption Value Tracking for Recyclables <br>
                          Order and Pick Ticket Spooler <br>
                          Alias Search in Inventory Maintenance <br>
                          Auto ROP-EOQ Calculation <br>
                          Update IM Transaction Register by Batch<br>
                          <a href="http://www.iigservices.com/enh/advance_dist.htm">Read More... </a></span></p>
                            </blockquote>
                        </blockquote></td>
                      </tr>
                    </table>
                  </div>
                  <strong><a href="javascript:toggleDiv('bus', 1)"><br>
                  <img src="product_files/bullet.gif" width="14" height="14" border="0">Business Management </a><br>
                  </strong>
                  <div style="display:none ;" id="bus" class="indent">
                    <table width="100%" border="0" cellspacing="0">
                      <tr>
                        <td><blockquote>
                            <p><span class="style4">Consignment Processing <br>
                        Point of Sale - Fast Sale <br>
                        Credit Card Processing <br>
                        eBusiness Image Maps <br>
                        Royalty Processing<br>
                              </span><span class="style4">Vendor Processing - Rebate, Remit To<br>
                                                      <a href="http://www.iigservices.com/enh/business_mgmt.htm">Read More... </a></span></p>
                        </blockquote></td>
                      </tr>
                    </table>
                  </div>
                  <strong><a href="javascript:toggleDiv('core', 1)"><br>
                  <img src="product_files/bullet.gif" width="14" height="14" border="0">Core Enhancements</a><br>
                  </strong>
                  <div style="display:none ;" id="core" class="indent">
                    <table width="100%" border="0" cellspacing="0">
                      <tr>
                        <td><blockquote>
                            <p><span class="style4">Multi-Currency <br>
                        Inter-company <br>
                        AP Paperless Office <br>
                        Purchase Order Import <br>
                        GL Account Comments in Cash Receipts</span><br>
                                                  <a href="core_enhancement.htm">Read More... </a></p>
                        </blockquote></td>
                      </tr>
                    </table>
                  </div>
                  <strong><a href="javascript:toggleDiv('mas', 1)"><br>
                  <img src="product_files/bullet.gif" width="14" height="14" border="0">MAS 500 Enhancements</a> </strong><br>
                  <div style="display: none ;" id="mas" class="indent">
                    <table width="100%" border="0" cellspacing="0">
                      <tr>
                        <td><blockquote>
                            <p class="style4">Auto Sales Processing <br>
                        Deal, Bracket, Best Pricing <br>
                        Faxing Integration <br>
                        Freight Allowance <br>
                        Future Cost Breaks in Vendor Item <br>
                        Multi-Company AR Aging <br>
                        Multi-Company <br>
                        Cash Applications <br>
                        Customer Memo Pop-Up <br>
                        Vendor Memo Pop-Up <br>
                        Price Sheets by UOM <br>
                        Quick Sales <br>
                        Sales Order Global Inquiry <br>
                        Shipping Automation <br>
                        Vendor Allowances <br>

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    toggleAll() is not a javascript command but, a function from some script or another, a script nowhere in evidence on your code sample. Without toggleAll() defined for that page, it will do nothing.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Yep, you need to let us know the script in question that actually defines and uses toggleAll(). Switch Content script has a similar function, but it's not toggleAll(): http://www.dynamicdrive.com/dynamici...tchcontent.htm

  4. #4
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default toggleAll script

    Sorry about that. Here is where toggleAll is defined:

    Code:
    <script>
    var openDivs = [];
    function toggleDiv ( id, level ) {
        var div = document.getElementById( id );
        if ( div.style.display == "block" )
            div.style.display = "none";
        else {
            if ( openDivs[level] ) openDivs[ level ].style.display = "none";
            openDivs[ level || 0 ] = div;
            div.style.display = "block";
        }
    }
    function toggleAll ( checkbox, id ) {
        var divs = document.getElementById( "containerDiv" 
    ).getElementsByTagName( "div" );
        var display = checkbox.checked ? "block" : "none";
        for ( var i=0; i < divs.length; i++ )
            divs[ i ].style.display = display; }
    </script>
    It was working when I had only 4 blockquotes. After I added 4 more it stopped working. The checkbox for toggleAll just does nothing. Please help.

    Thx

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Can we see the entire script, such as a link to it? I'm not sure this is even a DD script though?

Bookmarks

Posting Permissions

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