sanyamjain
New Member
Hi, I am making a tool where on selecting a drop down, I want to update the value of another element.
On selection a Service from the dropdown list, I want to load the rate of the service on a field element.
Invoice Table:
ozone_invoice___Service1
ozone_invoice___Service1_Rate
Service Table:
ozone_services___id
ozone_services___Service_Rate
I have placed this code on Javascriopt action change
But this is not working, please help.
On selection a Service from the dropdown list, I want to load the rate of the service on a field element.
Invoice Table:
ozone_invoice___Service1
ozone_invoice___Service1_Rate
Service Table:
ozone_services___id
ozone_services___Service_Rate
I have placed this code on Javascriopt action change
Code:
$db =&JFactory::getDBO();
$db->setQuery('SELECT `Service_Rate` FROM `ozone_services` where `id` = '2'');
$fieldA = $db->loadResult();
return $fieldA;
$('ozone_invoice___Service1_Rate').value = $fieldA;
But this is not working, please help.