Scriptcase 7.1 - Reload field using AJAX

Hello,

I have a problem with this feature.

Condition :

I have a one to many relation table in my database like this :
|State| 1-* |Province| 1-* |City| 1-* |District| 1-* |SubDistrict|
with simple entity which related to each table

I have set the program run like the example (Use AJAX to reload other fields of type Select, Double select, Radio and Checkbox).

  • When i choose (onchange value) State, the following province value will show up
  • when i choose (onchange value) Province, the following City value will show up
  • when i choose (onchange value) City, the following District value will show up
  • when i choose (onchange value) District, the following SubDistrict value will show up

Problem :

  • Whenever i choose (onchange value) the state again, the following province will show up, but the City, District still remain the previous value.

Question :

  • How to set the City, and District back to null value when i change the State value ?
  • How to set the choosing method using ‘onblur’ ?

Thanks, sorry for bad english :o

You need to select the other fields in your first ajax reload option. This is the only field which onchange will trigger.

Sorry, need more detail explanation…

i have tried your suggestion, but i didn’t work.

And if the onchange is the only method, how to set the 1st value of select is null / empty ?

Thanks Albert,

For additional information, in the “Lookup Settings” on the field, we must enabled the “Use Title” to “Yes”

Yes, if the field is set to default value the event will not trigger. then you need an empty initial field which can be set the way you describe.