To get an answer to my problem I have created an example situation.
I have an external .js file that holds the details of a number of properties, address, price etc.
What I would like to do is:
1) Use the data from a particular field in each record to create a seperate menu in alphabetic order.
2) As there may be multiple instances of the data, limit it to appearing only once in the menu.
3) Make the menu item a clickable link which will then limit the records shown to only those chosen by the link.
Here is the code for both files:
--- The external .js file (properties.js) ---
var data = new Array();
data = "Chester Square | Belgravia | £3,450,000 | Freehold | An opportunity to acquire this magnificent and superbly refurbished family house built circa 1840 and situated at the eastern end of this prestigious Belgravia garden square, set in one of London's premier locations. The accommodation comprises entrance hall, dining room, reception room, kitchen/breakfast room, six bedrooms, family room, study/library, study, utility room, en-suite shower room, two en suite bath/shower rooms, bathroom, cloakroom, conservatory, roof terrace and balcony. | "
data = "Audley Square | Mayfair | £5,750,000 | Freehold | An impressive ambassadorial Grade II listed 18th century freehold residence with private garden and garaging located in the heart of Mayfair with views over Tilney Street towards Hyde Park. The property is conveniently located close to the comprehensive shopping and transport facilities that Mayfair has to offer. | "
data = "Hereford House, North Road | Mayfair | £2,150,000 | Leasehold | A recently refurbished fourth floor (with lift) of a portered building off Park Lane, this impressive three bedroom apartment offers vast living space. The property comprises a 24ft reception room with natural stone fireplace, spacious dining room, stylish kitchen, sumptuous master suite and two further bedrooms both with en suite bathrooms. | "
data = "Eaton Place | Belgravia | £1,985,000 | Leasehold | An elegant and immaculate three bedroom maisonette set on the third and fourth floors of this imposing period building. The property has recently been refurbished to a very high standard and comprises entrance hall, L-shaped drawing/dining room, kitchen, master bedroom, dressing room, two further bedrooms, cloakroom, two en-suite bathrooms, shower room and direct lift access. Ideally situated in this prestigious Belgravia address, the property is within easy access of a wide array of shopping, transport and entertainment facilities. | "
data = "Yeomans Row | Knightsbridge | £1,750,000 | Freehold | A rare opportunity to acquire a four bedroom freehold terraced house situated in this quiet cul-de-sac off the Brompton Road in the heart of Knightsbridge. The property comprises entrance hall, dining room, eat-in-kitchen, L-shaped drawing room, four bedrooms, bathroom, cloakroom, patio garden, utility and storage in basement. | "
data = "Warriner Gardens | Battersea | £265,000 | Share Freehold | A charming one bedroom garden flat in this fantastic location just moments from Battersea Park. The well appointed accommodation comprises reception room with bay window and stripped wood floors, double bedroom with fitted cupboards, large kitchen / diner with bay window to side, bathroom and lovely private paved garden to the rear. Warriner Gardens runs along side Prince Of Wales Drive and is within walking distance to both Battersea Park and Queenstown Road train stations and all the local amenities on Battersea Park Road. No onward chain. | "
data = "Brompton Road | Knightsbridge | £875,000 | Leasehold | A bright and spacious apartment set on the fifth floor of this popular portered block. The property has been recently decorated and comprises entrance hall, reception room, dining hall, four bedrooms, en-suite bathroom, en-suite shower room, cloakroom, kitchen, lift and porter. Ideally situated in this prestigious address it is within easy access to the wide range of amenities of Knightsbridge. | "
data = "Thurloe Place | Knightsbridge | £735,000 | Leasehold | A wonderfully bright and spacious second floor flat situated in this mansion block. The flat benefits from porterage and access (by separate negotiation) to the roof terrace and Thurloe Gardens. The flat comprises of two bedrooms and a study, en-suite shower room, bathroom, eat-in kitchen, utility room and large reception room. | "
data = "Cale Street | Chelsea | £2,000,000 | Freehold | A rare opportunity to acquire a magnificent five bedroom period house located in this popular Chelsea Green Village, benefiting from a garden and swimming pool. The property is in good condition and comprises reception room, dining room, kitchen, five bedrooms, three en suite shower rooms, two en suite bathrooms, garden, terrace, heated swimming pool and spa. Ideally situated in this prestigious address, it is within easy access to the wide range of amenities available in Chelsea. | "
data = "North Audley Street | Mayfair | £2,200,000 | Leasehold | A grand second floor family apartment with high ceilings and views towards Grosvenor Square. The apartment has been modernised over recent years and is beautifully presented. | "
data = "Cheyne Walk | Chelsea | £999,000 | Share Freehold | A bright and spacious fourth floor three bedroom apartment set in this prestigious portered block. The property is offered in good condition throughout and comprises entrance hall, reception room, dining area, open plan kitchen, master bedroom with en-suite bathroom, two further bedrooms and a shower room. Further benefits include lift, 24 hour porterage, underground parking space and access to communal gardens. Ideally situated within easy access to the wide range of amenities available in Chelsea with the added bonus of amazing river views. | "
data = "Warriner Gardens | Battersea | £275,000 | Leasehold | A bright well presented top floor two bedroom flat in this popular road running parallel behind Battersea Park. This split level property comprises reception room with bay window, kitchen / breakfast room, master bedroom with fitted cupboards, bedroom, bathroom and access to large loft space. Warriner Gardens runs parallel to Prince Of Wales Drive and is conveniently located for access to the open spaces of Battersea Park. Transport is provided by way of Battersea Park station and Queenstown Road. | "
--- The HTML file (properties.htm) ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<title>Properties For Sale</title>
it(" | ");}
i]+" - "+data[i]+"";}
<table id="container" align="center" cellspacing="0" cellpadding="0" border="0" width="400"><tbody></tbody
I want to use the information in data[i] of each record for the menu system. It doesn't matter if the menu needs to be a seperate html page that will be in a frame or iframe
I realise that this may be a little difficult, so I'm putting ALL my points on this one. I hope it makes sense what I'm trying to do and if more clarification is required, please ask.