[ic] Improving my search form

Paul Jordan paul at gishnetwork.com
Mon Feb 8 18:33:29 UTC 2010


> DB wrote:
>>> [snip]
>>
>> Thanks - that looks pretty slick and I see that many other plugins
>> exist. Can you provide any hints/examples about how to pass info back
>> and forth between the plugin and IC?
>>
>> DB
>>
>>
>
> In its simplest form..... (not tested, most certainly has bugs)
>
>
> 1) Include jquery and the double select plugin in the html head
>
> <script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
> <script type="text/javascript" src="/js/jquery.doubleselect.js"></script>
>
> 2) Create the options array from ITL [query] statements
>
>
> [query
>    type=list
>    prefix=brand
>    sql=|
>        SELECT  distinct brand
>        FROM    brandmodel
>        ORDER BY brand
>        |]
> [list]
>
> [tmp ds_options][scratch ds_options]
>    "[brand-code]": {
>        "key" : [brand-increment],
>        "defaultvalue" : "",
>        "values" : {
>            [query
>                type=list
>                prefix=model
>                sql=|
>                    SELECT  distinct brand
>                    FROM    brandmodel
>                    WHERE brand = [brand-code]
>                    ORDER BY model
>                    |]
>            [list]
>            "[model-code]": [model-code],
>            [/list]
>            [/query]
>                }
>        },
> [/tmp]
>
> [/list]
> [/query]

I'm not paying much attention to this thread (so there may be more bugs), 
but I did glance at it and Marty is right, one bug I see is that you'd need 
to use the prefix alternate "except_last" parameters to suppress the 
trailing "," in your:

           "[model-code]": [model-code],

That will highly likely Bork in IE. This is better:

           "[model-code]": [model-code][model-alternate 
except_last],[/model-alternate]

Paul


 




More information about the interchange-users mailing list