View Single Post
  #3 (permalink)  
Old June 14th, 2004, 04:41 PM
fs22 fs22 is offline
Friend of Wrox
 
Join Date: Apr 2004
Location: Wausau, WI, USA.
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Snib,

Thanks for the assist...am still working on it, but I ran across something here related to this I need assistance on...How do I loop through a multidimensional array with a for loop easily? Here is a snippet of the array:

var ID = new Array();

        ID[0] = new Array();
        ID[0][0] = "3308";
        ID[0][1] = "Allow ACTIVANT to receive your alerts as an email";
        ID[0][2] = o3Web.sOptionGet(type,ID[0][0]);

        ID[1] = new Array();
        ID[1][0] = "3326";
        ID[1][1] = "Record 'An iNet Order has been placed' alerts";
        ID[1][2] = o3Web.sOptionGet(type,ID[1][0]);

        ID[2] = new Array();
        ID[2][0] = "3320";
        ID[2][1] = "Record 'QOH has gone to zero' alerts";
        ID[2][2] = o3Web.sOptionGet(type,ID[2][0]);

Is there a way to loop through a multidimensional array?

Quote:
quote:Originally posted by Snib
 Hopefully this is something like you want....

function w(txt)
{
document.write(txt);
}
w("<table>");
for(i=0;i < yourArray.length;i++)
{
if(yourArray[i].dontWrite == false)
{
w("<tr><td>");
w(yourArray[i].txtvalue);
w("</td></tr>");
}
}
w("</table>");

Adjust it and tell me if it works,

Snib

<><
Clay Hess
Reply With Quote