Announcement

Collapse
No announcement yet.

Refresh drop-down list according to another selected field

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Refresh drop-down list according to another selected field

    Hi everyone,

    I want to create a code that permits to refresh a list when we select data from another field of the form.
    I have found through the internet this code but i don't know how to use it in scriptcase:

    " sub relationheberzone

    DIM ltierheber as Object , ltierzone AS Object
    DIM var_tierheber as integer

    ltierheber = ThisComponent.DrawPage.Forms.getByName("Standard") .getByName("tierheber")
    ltierzone = ThisComponent.DrawPage.Forms.getByName("Standard") .getByName("tierzone")

    var_tierheber = ltierheber.SelectedItems(0)

    ltierzone.ListSource() = array("SELECT nom_zones, idzones FROM zones WHERE fk_idhebergement =" & var_tierheber)
    ltierzone.refresh

    end sub "


    I would be grateful if anyone can point me!!!

  • #2
    Your code is VB, and I doubt you can integrate, unless you are under IIS.

    Otherwise, what list do you want to refresh? a combobox? Example: update poblation list when country is selected?

    If this is your case, you can use AJAX processing to do this.
    Captura.JPG
    /Giuseppe

    Professional Scriptcase Services
    Some Customers opinions

    Comment


    • #3
      Yes it's a combobox. Could you tell me please how i can do it in Ajax please!!
      I am just a girl who wants to perform in men's world.

      capture.jpg

      Comment


      • #4
        Look at this video, how Ajax Processing property is used.

        https://www.youtube.com/watch?v=jU0D9ilv_WY
        /Giuseppe

        Professional Scriptcase Services
        Some Customers opinions

        Comment


        • #5
          Thanks Gui!! it's working

          Comment

          Working...
          X