CountryTrash
Member
Hi there,
I have a list that is a join between 3 tables.
jos_users to intra_shops to intra_zone
jos_users->shopid to intra_shops->id then intra_shops->zoneid to intra_zone->id
I have a problem using the (change) javascript on an element on a form
If I enter the one line with hardcoded data 'xxxx'
form_4.formElements.get('jos_users___nlevel').update('xxxx');
then the field nlevel gets updated with 'xxxxx'
HOWEVER
I want to read a field on the form from the zone portion on the form and fill it in on the jos_users section into a new field
When I now replace the line above with the following 2 lines:
var z = form_4.formElements.get('intra_zone___zone_description').getValue();
form_4.formElements.get('jos_users___nlevel').update(z);
IT does nothing.
even if I change the z variable to the hardcoded one
var z = form_4.formElements.get('intra_zone___zone_description').getValue();
form_4.formElements.get('jos_users___nlevel').update('xxxx');
It still does nothing until I remove the 1st line.
I will appreciate ANY advise.
(I am actually an old VBA developer now tampering in FABRIK and so I will most likely ask for more advise)
by the way: I am trying this workaround with the joined tables as I could not wrap my head around the JS and Ajax combination to go and look up the zone description via a SQL query
I have a list that is a join between 3 tables.
jos_users to intra_shops to intra_zone
jos_users->shopid to intra_shops->id then intra_shops->zoneid to intra_zone->id
I have a problem using the (change) javascript on an element on a form
If I enter the one line with hardcoded data 'xxxx'
form_4.formElements.get('jos_users___nlevel').update('xxxx');
then the field nlevel gets updated with 'xxxxx'
HOWEVER
I want to read a field on the form from the zone portion on the form and fill it in on the jos_users section into a new field
When I now replace the line above with the following 2 lines:
var z = form_4.formElements.get('intra_zone___zone_description').getValue();
form_4.formElements.get('jos_users___nlevel').update(z);
IT does nothing.
even if I change the z variable to the hardcoded one
var z = form_4.formElements.get('intra_zone___zone_description').getValue();
form_4.formElements.get('jos_users___nlevel').update('xxxx');
It still does nothing until I remove the 1st line.
I will appreciate ANY advise.
(I am actually an old VBA developer now tampering in FABRIK and so I will most likely ask for more advise)
by the way: I am trying this workaround with the joined tables as I could not wrap my head around the JS and Ajax combination to go and look up the zone description via a SQL query