p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Javascript How-To (http://p2p.wrox.com/forumdisplay.php?f=87)
-   -   Comparing arrays in javascript (http://p2p.wrox.com/showthread.php?t=17581)

JohnD August 29th, 2004 02:32 PM

Comparing arrays in javascript
 
Hi,

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


All times are GMT -4. The time now is 01:35 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.