View Single Post
  #1 (permalink)  
Old August 29th, 2004, 02:32 PM
JohnD JohnD is offline
Registered User
Join Date: Aug 2004
Location: Dublin, , Ireland.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Comparing arrays in javascript


I figure this should be easy but...

I have two arrays;
ar1 = ("123","234","456");
ar2 = ("098;a;b","987;d;e","234;f;g","876;h;i","456;j;k" );

I am using these two arrays to produce a list box on a form that will allow people to update an existing record in a database. The first array contains data that was originally selected and the second is the omplete dataset from which users can make a selection.

I want the selection box to have "pre-selected" the oiginal group but to display the complete set of options.

Any suggestions for comparing the two arrays. Actually writing this suggests an alternate method to the ones I have tried.

More anon.

Head of innovation and Industry Services,
Faculty of Applied Arts
Reply With Quote