Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 29th, 2004, 02:32 PM
Registered User
Join Date: Aug 2004
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: Arrays using JavaScript,/JSP Iterator in IE celticbhoy Javascript How-To 3 December 11th, 2007 10:55 AM
Help: Arrays using JavaScript,/XML in IE celticbhoy Ajax 0 December 10th, 2007 01:15 PM
Comparing Arrays mattastic Javascript 2 January 27th, 2006 05:48 AM
Accessing of Arrays of jsp in javascript theguardian@vsnl.net JSP Basics 1 August 26th, 2004 11:16 PM
Accessing of Arrays of jsp in javascript theguardian@vsnl.net JSP Basics 0 August 26th, 2004 12:54 PM

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