Hot Swap using Onchange Form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Noah

    Hot Swap using Onchange Form

    I have seen this technique on a couple websites, but haven't been
    clear on how it's done. What I am looking for is to have a form with
    x-options. The technique is that when the first option is selected it
    auto updates the other options to correspond. For example if I was
    looking for specific cities in a state. Once a state is selected I am
    only given specific cities. The end result is to combine this with
    php and mysql, but I am sure if I understand the javascript aspect I
    can run with it. Thanks.
  • Matt Kruse

    #2
    Re: Hot Swap using Onchange Form

    "Noah" <ullmannn@msu.e du> wrote:[color=blue]
    > For example if I was
    > looking for specific cities in a state. Once a state is selected I am
    > only given specific cities.[/color]

    There are many libraries available to do this - my new one is at


    There are issues to consider when using javascript to manipulate option
    lists, such as falling back to pure html if javascript is not enabled, but
    that may or may not apply in your situation. I'm sure Richard will post a
    followup scolding you for wanting to do this at all ;)

    --
    Matt Kruse
    Javascript Toolbox: http://www.mattkruse.com/javascript/


    Comment

    Working...