• 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: Multi Drop Down Calculation - help me

Multi Drop Down Calculation - help me 13 years 8 months ago #11311

  • office40
  • office40's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
please tell me where is wrong

without calculation work
when insert a number in front does not work
does not show me items from JavaScript in the form.




items in drop down


25|Wien
15|Mödling
10|Vösendorf
45|Wiener Neudorf


_____________________________
JavaScript:




function dynamic2(parent,child)
{
var parent_array = new Array();
parent_array = ;

parent_array = ;
parent_array = ;
parent_array = ;
parent_array = ;

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.text = parent_array[parent_value];
thechild.options.value = parent_array[parent_value];
}
}
The administrator has disabled public write access.

Re:Multi Drop Down Calculation - help me 13 years 7 months ago #11346

  • andreic
  • andreic's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 722
  • Thank you received: 59
Hello,

From what I can see the script is not working because you are not setting the parent parameter correctly. If you set the drop-down items:
25|Wien

..then in order for the script to work please try using
parent_array['25'] = ['PLZ','1010 Wien','1020 Wien','1030 Wien'];

instead of
parent_array['25|Wien'] = ['PLZ','1010 Wien','1020 Wien','1030 Wien'];
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
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!