SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2007
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    onstateChange event

    HTML Code:
    <select name="country">
                <option>india</option>
                <option>usa</option>
                <option>pak</option>
                <option>england</option>
                <option>aus</option>
                <option>newzeland</option>
                <option>rsa</option>
                <option>srilanka</option>
                <option>west indies</option>
              </select>
            </div>
          </label></td>
        </tr>
        <tr>
          <td><div align="right" class="style4">City/Area</div></td>
          <td>:</td>
          <td><label>
            <div align="left">
              <label>
              <select name="area" size="1" multiple="multiple" id="area">
              </select>
              </label>
    i have a list of countries in one select box.when i selecting a perticular country,depending on country, how to change a cities/area list box automatically.suppose when i selected a usa then i want to show only usa cities.like england....etc..

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's an interesting solution to this problem here:

    http://www.wait-till-i.com/index.php?p=411

    The solution you need depends whether you're wanting to retrieve the secondary list from the server or not.

  3. #3
    SitePoint Guru
    Join Date
    Apr 2007
    Posts
    813
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    more unobstructive way, If you want to learn further more. I saw his pdf presentation, it is really amazing.


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
  •