locked
How to show filtered data in the look up field? RRS feed

  • Question

  • Hi all,

    I have big problem. I have two lookup fields country and city. After User selects a country from country look up field, city_look_up field should be filtered related to selected country. For example, if I select Turkey i want to see Ankara, İstanbul...... on city field. 

    I read all forums page, but i did not solve this problem yet. Everybody says following code works but not works for me. Because turkish charachter problem occurs in search area. For example, after i select "türkiye" from country field, i am clicking  city look up field but  search box area automatically typed like this --------> "t�rkiye" If there are no turkish charachter at country field there is no problem for me. But other cases, evertime I have problem... Please help me..


    //Form OnLoad
    document.FilterLookup = function(source, target)
    {
        if (IsNull(source) || IsNull(target)) { return; }

        var name = IsNull(source.DataValue) ? '' : source.DataValue[0].name;

        target.additionalparams = 'search=' + name;
    }

    //Country Look Up Field OnChange

    document.FilterLookup(crmForm.all.new_countryid, crmForm.all.new_cityid);

    Thanks in advance,

    Erdoğan Uslu
    Thursday, August 27, 2009 4:15 AM

Answers

All replies