You can save heaps of string length by making a single, comma-separated string rather than an array of strings, then splitting in javascript to form an array, then prepending 'div' to each element when you loop through:

By the way UJ, I played around with this in IE6 on my clunky old gen' purpose computer and it handled a text array of 400 elements easily and created 400 divs, with fancy styles to make them visible, without drawing breath.

Just a thought, have you tried "view source" to see if your long string is being composed, served and received OK by the browser? That should tell you which side to look; server-side or client-side.

The array is there. The actual cut-off point appears to be 255 divs. I'm thinking there may be a limit in scriptaculous, which I'm trying to find in the source.

I did look at "view source" and there aren't any problems. As a matter of fact when I use the 400 div array the first 255 divs dragNdrop as expected, the remaining are not draggable. That's why I'm thinking there is a "# of elements" limit somewhere.

No experience of scriptaculous here, but must say it's a candidate for the source of the problem.

Do you (a) submit the whole array of 400 to a scriptaculous method or (b) loop through outside scriptaculous and submit the array values individually? If (a) then can you modify code to (b)? Might cure it. If you do (b) already, then I suggest that the problem is probably not in scriptaculous.

You could try slicing off the first 100 elements from your 400 array and submitting the remainder. See where it breaks down now. Is it at (a) the old 255 point (now 155) or (b) the new 255 point (was 355)?

(a) would suggest a data error in the delivered array, and (b) would suggest a memory/range limitation.

Hmmm, that's tricky. I guess that .each is well capable of handling a 400 element array - you could test it with something simple of the same length but I'm pretty sure it would work. You could also test it with your divIds array but get it to do something much simpler and see how far it gets.

Meanwhile, try my suggestion above - slice off the first 100 elements and see what happens.

We have a clue...I tried the slice (thanks Airshow). Even though the first 100 were sliced off, the list broke at the same point. In other words, the draggables apparently didn't end according to the number, but apparently the position in the array. I'm looking over the "view source" for a clue right now...

Airshow-
I'm starting to think there may be a problem with the draggable div size. When I sliced the first 100 divs off the array the first 100 divs are still displayed, they are just not draggable since they were not defined as a "new Draggable".

So, each tab still had the same number of div elements within it, but the cutoff was the same.

The problem is that my browser ( OPERA v8.65/s60v2 series OPERA's exclusive browser for handheld devices ), is limited to handle this type of event, involving draggable items'.
So i wont be able to provide efficient help on my solutions for this issue.
But i'm working things out and preempting that all things is happening in the usual way.

Here's another workaround, but i am not sure if this is a valid syntax in scriptalicious, where i have performed a line, by bypassing their class ( each ):

Thanks for all your help. I tried to plug Essential's code snippet into my routine, but still no luck. I ended up putting an alert statement in the routine for every add.Draggable call to see where the break was occuring. It took several days of experimentation, but I discovered I particular div was breaking the loop no matter the array size. Apparently, the suspect div content wasn't there in the abbreviated set that worked well.

Ultimately, there was an apostrophe ' in the text of the div content that the parser was interpreting as a special character. I removed the apostrophe and it works perfectly.

Thanks a million for all your help. I plan to load this website (my first) on a server this weekend. If your interested I'll send you the URL. I'd love to know what a couple of knowledgable (<-sp?) folks think of my first effort.

Have a great evening, and thanks again for all your help. This wouldn't have gotten done without your guidance.