This topic is locked

from other table to Javascript Onload

8/20/2019 12:59:54 PM
ASPRunnerPro General questions
S
silverpc author

Hello,

im using javascript onload to hide sections of add/edit base on this post here and the online manual here

var ctrlCountry = Runner.getControl(pageid, 'country');

ctrlCountry.on('change', function(e){

if (this.getValue() == 'US'){

$("tr[data-fieldname='state']").show();

}else{

$("tr[data-fieldname='state']").hide();

}

});



all works good as it is but i need to get the country information from other table call "Info" where the record ID is 1. i need to transfer the country field from that table to this add/edit on table "SubList". how can i do this?
thank you for your help.

admin 8/20/2019

I'm struggling to understand what the following means 'transfer the country field from that table to this add/edit on table "SubList"'.
How do you transfer a field? Maybe you should supply some screenshots that would explain the issue? What version of ASPRunnerPro is that?

S
silverpc author 8/22/2019



I'm struggling to understand what the following means 'transfer the country field from that table to this add/edit on table "SubList"'.
How do you transfer a field? Maybe you should supply some screenshots that would explain the issue? What version of ASPRunnerPro is that?


hi Admin, let me see if i can explained better. Im using version 10.2
i have 2 tables
table info

ID - 1

Country - USA

Language - English
Table SubList

ID - 23

State - FLorida

Name - Mike
when i add a new record on table "SubList" the state field will be depending on the country set on table "info" where record ID is 1.

if country in table "Info" is not USA hide state field on table "SubList" when add new record.

admin 8/28/2019

I still do not see any relation between info and SubList tables. I would suggest posting your project to Demo Account and contacting support directly.