Results 1 to 5 of 5

Thread: ajax dinamyc state/city question

  1. #1
    Join Date
    Feb 2008
    Posts
    27

    Default ajax dinamyc state/city question

    How can I load 2 separate xml files into the city drop down instead of one.

    In my case I have 2 types of places: urban and rural
    So there is a state.xml with urban places from that state and state_rural.xml with willages from that certain state.
    What I wish is to load both xml files into the same drop down menu and have them separated using <option label...

  2. #2
    Join Date
    Dec 2006
    Posts
    317

    Default Re: ajax dinamyc state/city question

    You can have cityA-urban.xml, cityA-rural.xml... in your xml files to keep it 2 level search, or use 3 level search.
    1) 2levelsearch
    state -choose city-A-urban.xml or city-A-rural.xml ...
    2) 3levelsearch
    state - choose city-A
    city-A - choose urban or rural

  3. #3
    Join Date
    Feb 2008
    Posts
    27

    Default Re: ajax dinamyc state/city question

    Thank you for your reply.
    That is exactly how I did, only that I wish to have the city drop down showing like here : http://www.imobiliare.ro/bucuresti-ilfov/apartamente
    Where it sais 'Localizare', click on the drop down with Bucuresti selected and you will see the options to search only the rural localities or only urban localityes at the top, with option label "Arii de cautare" and below there are the cityes with option label "Lista orase". That is what I would like to do, to have the options with option labels.

  4. #4
    Join Date
    Dec 2006
    Posts
    317

    Default Re: ajax dinamyc state/city question

    possible to do, that search is all hard-coded though, it would work for a small-mid size list of locations. What you want is called search list if I remember correctly. I also like search list and use it extensively but for locations I also used another solution where the selections are moved into another box with onclick.

    If you want to do it on your own, study the js from that site. They used jQuery but you should also be able to do it with Spry as well, for which you probably would need to use NestedDataSet js file as well. Another issue may be how to make the search work when you have state and city in the query. SQL will add them with AND but you probably want OR. So you may also need a new search query.

  5. #5
    Join Date
    Mar 2008
    Location
    New York, NY
    Posts
    193

    Default Re: ajax dinamyc state/city question

    Wow.. I have the same problem. What I just did was create a new search field. Oh Well... I have apartments in NYC and it usually goes like this.

    State >> City >> Neighborhood

    BTW.. MAXI.... YOU HAVE AN AMAZING DESIGN.. UP UNTIL NOW I THOUGHT I HAD THE BEST ONE.. Hehehehe

    http://www.friendswithpassion.com <-- I am actually gonna use nycbrokerfree.com and empire-apartments.us when I get the site live..

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
  •