Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Posts
    160
    Thanks
    10
    Thanked 1 Time in 1 Post

    Help with Script Change

    Hi

    I have inherited the following script but I need to add 2 extra dropdown to the menu but not sure how to do them.

    Can anyone show me how it could be done.

    At the moment the drop-down show Australia with 3 items in the 2nd box and South Africa with 7 items.

    I now need to add USA and Canada and some options below these.

    Thanks
    Roy

    Code:
    			var sndCombosData = new Array( 
    				new MCComboItem( 'Australia', 'SA2', '', 
    					new Array( 
    						new MCComboItem( 'New South Wales', 'nsw', 'The SA2B1', null ),
    						new MCComboItem( 'Queensland', 'queensland', 'The SA2B2', null ),
    						new MCComboItem( 'Victoria', 'victoria', 'The SA2B1', null )
    						
    					)
    				),
    				
    				new MCComboItem( 'South Africa', 'SA1', '', 
    					new Array( 
    						new MCComboItem( 'Eastern Cape', 'easterncape', 'The SA1B3', null ),
    						new MCComboItem( 'Gauteng', 'gauteng', 'The SA1B3', null ),
    						new MCComboItem( 'KZN', 'kzn', 'The SA1B1', null ),
    						new MCComboItem( 'Mpumalanga', 'mpumalanga', 'The SA1B3', null ),
    						new MCComboItem( 'North West', 'northwest', 'The SA1B3', null ),
    						new MCComboItem( 'Northern Province', 'northern', 'The SA1B3', null ),
    						new MCComboItem( 'Western Cape', 'westerncape', 'The SA1B2', null ),
    						new MCComboItem( 'Free State', 'freestate', 'The SA1B2', null )
    						
    						
    						
    						
    					)
    				)
    				
    				
    			);
    		
    			function SndOnChoice( val )
    			{
    				return;
    			}
    			
    			
    			
    			MCStart( 'SndFirstCombo', 'sndCombosData', 'SndOnChoice', null );

  • #2
    Regular Coder
    Join Date
    Mar 2008
    Location
    London
    Posts
    152
    Thanks
    4
    Thanked 42 Times in 42 Posts
    So whats the problem ?

    Code:
    var sndCombosData = new Array( 
    				new MCComboItem( 'Australia', 'SA2', '', 
    					new Array( 
    						new MCComboItem( 'New South Wales', 'nsw', 'The SA2B1', null ),
    						new MCComboItem( 'Queensland', 'queensland', 'The SA2B2', null ),
    						new MCComboItem( 'Victoria', 'victoria', 'The SA2B1', null )
    						
    					)
    				),
    				
    				new MCComboItem( 'South Africa', 'SA1', '', 
    					new Array( 
    						new MCComboItem( 'Eastern Cape', 'easterncape', 'The SA1B3', null ),
    						new MCComboItem( 'Gauteng', 'gauteng', 'The SA1B3', null ),
    						new MCComboItem( 'KZN', 'kzn', 'The SA1B1', null ),
    						new MCComboItem( 'Mpumalanga', 'mpumalanga', 'The SA1B3', null ),
    						new MCComboItem( 'North West', 'northwest', 'The SA1B3', null ),
    						new MCComboItem( 'Northern Province', 'northern', 'The SA1B3', null ),
    						new MCComboItem( 'Western Cape', 'westerncape', 'The SA1B2', null ),
    						new MCComboItem( 'Free State', 'freestate', 'The SA1B2', null )
    					)
    				),
    
    				new MCComboItem( 'USA', 'SA3', '', 
    					new Array( 
    						new MCComboItem( 'dddd', 'dddd', 'dddd', null ),
    						new MCComboItem( 'eeee', 'eeee', 'dddd', null ),
    						new MCComboItem( 'ffff', 'ffff', 'ffff', null )
    						
    					)
    				),
    				
    				new MCComboItem( 'Canada', 'SA4', '', 
    					new Array( 
    						new MCComboItem( 'aaaa', 'aaaa', 'aaaa', null ),
    						new MCComboItem( 'bbbb', 'bbbb', 'bbbb', null ),
    					)
    				)
    			);


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •