Is not better to use an object inside of the Array. at least is more readable
var uri = [ { base : "mypathbase/", img : "image1.png" }, { base : "mypathbase/", img : "image2.png" }] var img = uri[0].base + uri[0].img; // mypathbase/image1.png best On Sep 28, 2:24 pm, Walter Lee Davis <wa...@wdstudio.com> wrote: > Imagine two arrays: > > [one, two, three, four] > [three, four, five, six] > > And I want to end up with [one, two, three, four, five, six] but I > have no guarantee that there aren't some repeated values in there -- I > can't just use Prototype's Array#uniq to do this -- because order of > elements is important. I need the equivalent of lining up two > transparencies on a light table, except with arrays. > > That's a very simplified model, let me explain what they really > represent: The first is the base HREF of the page, and the second is a > path to an image file. I need to construct an absolute URI to the > image, regardless of whether it was coded as a root-relative or page- > relative URL in the HTML. > > Can anyone suggest a way to do this? > > Thanks, > > Walter -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.