PDA

View Full Version : "toggleAll" does not work



elmansa
06-20-2005, 11:58 PM
Hi Guys,

Here is my deal. I can not get nClick="toggleAll(this,'containerDiv') to work: cab anyone help?


<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>

jscheuer1
06-21-2005, 05:39 AM
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.

ddadmin
06-21-2005, 06:48 AM
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/dynamicindex17/switchcontent.htm

elmansa
06-21-2005, 05:39 PM
Sorry about that. Here is where toggleAll is defined:


<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

ddadmin
06-21-2005, 07:08 PM
Can we see the entire script, such as a link to it? I'm not sure this is even a DD script though?