• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Dynamic Drop-down change form ?

Dynamic Drop-down change form ? 12 years 6 months ago #15371

  • rohat
  • rohat's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
hi all
this is script for Dynamic Drop-down change form example ;
<script type="text/javascript">
 
function dynamic1(parent,child){
 
	var parent_array = new Array();
 
	parent_array[''] = ['Please select a manufacturer'];
 
	parent_array['Audi'] = ['A3','A4','A5','A6','A8','Q5','Q7','S3','S4','S5','S6','S8','RS6'];
 
	parent_array['Dacia'] = ['Sandero','Logan'];
 
	parent_array['FIAT'] = ['Bravo','Punto','Grande Punto'];
 
	parent_array['Peugeot'] = ['207','308','407','607'];
 
	parent_array['SEAT'] = ['Ibiza','New Ibiza','Leon'];
 
	parent_array['Skoda'] = ['Fabia','Octavia Tour','Octavia 2','Superb'];
 
	var thechild = document.getElementById(child);
 
	thechild.options.length = 0;
 
	var parent_value = parent.options[parent.selectedIndex].value;
 
	if (!parent_array[parent_value]) parent_value = '';
 
	thechild.options.length = parent_array[parent_value].length;
 
	for(var i=0;i<parent_array[parent_value].length;i++){
 
		thechild.options[i].text = parent_array[parent_value][i];
 
		thechild.options[i].value = parent_array[parent_value][i];} }
 
</script>

onchange="dynamic1(this,'CarModel');"

You will just have to change the value "CarModel" with the name of the second drop-down list.

so is this possiable to add 3.section

i mean
1-Car Manufacturer (*)--Audi--
2-Car Model (*)--A3--
3-HP (Example)(*)--150HP--

Thank you
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!