Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 2 of 2

Thread: Dependent selectbox with Get-It (OAA)

  1. #1
    Junior Member
    Join Date
    Feb 2002
    Location
    Copenhagen
    Posts
    6

    Default Dependent selectbox with Get-It (OAA)

    I am using the OAA Tailoring Kit (Peregrine Studio 2.2) to customize Get-Services 2.3 and want to create a selectbox to show the relevant Subcategories for the Category selected in another selectbox; just like in
    ServiceCenter, where you in a format can use the SELECT function to show field values from selected records in a file:
    select( "subcategory", "subcategory", "category", [$category] )
    which says
    SELECT subcategory FROM subcategory WHERE category=[$category].

    I will like to know if anyone of you have ideas or examples of how such a dependent selectbox can be created in Get-It? And how to do it?

    I have asked Peregrine support for a solution. The answer I got was:
    "Yes it can be done; still the best way to implement that is depend on
    customer's data and the context of the project being implemented.

    Using HTML combobox widgets dynamically linked, would require client side scripting. In theory, you must generate a first list (example: category), after the selection of one elements in the first list, to generate a second list (example: subcategory), with like selection criteria elements of this second list, the element selected in the first. This type of script is a client side scripting.

    Another option would be to use lookup widget."

    This don't help me to figure out how to do it, so I hope you can help me.

  2. #2
    Junior Member
    Join Date
    Jul 2002
    Location
    United Kingdom
    Posts
    17

    Default Dependent selectbox with Get-It (OAA)

    There are a number of ways to do this.

    The reply from Peregrine appears to describe use of client-side scripting. When the page is loaded, all the values for category, subcategory etc are downloaded and stored in arrays in the script. When the category is changed, the event triggers a client-side script to change the subcategory list options to match the category. This would require extensive client-side scripting.

    Another approach, which I have used before, is to use lookup windows. The subcategory lookup would check the current category value and include it in the query to list the available subcategories. This is less polished than using dropdowns which change dynamically (as above), but is much easier to code.

    It is also possible to place the code which populates the dropdowns in the form's onload script (server-side). When a category is changed, a client-side script is triggered to force a submit. The onload script determines the subcategory values to use according to the category in the input message. The effect is similar to the client-side approach, but is simpler to code. It does involve a round-trip to the server though.

    Hope this helps...
    Martin Frain
    Topspeed Consultants Ltd

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts