preload dropdown

Discussion in 'ASP General' started by phil2phil, Oct 27, 2005.

  1. phil2phil

    phil2phil Guest

    hi,
    had a question on preloading a dropdown. we have a textbox and
    dropdown on the page, user is suppose to enter in a zip into textbox,
    then the dropdown should load the state based on the zip. we can pull
    the state from the database on a zip match table, but how do we preload
    the dropdown, is there a way without posting back?
     
    phil2phil, Oct 27, 2005
    #1
    1. Advertising

  2. phil2phil

    Steven Burn Guest

    You need to use client-side code for this, not server-side, ergo, your
    question would be best placed in a JScript, Javascript or VBScript
    newsgroup.

    As a little hint, do a search for MM_jumpMenu ;o)

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!

    "phil2phil" <> wrote in message
    news:...
    > hi,
    > had a question on preloading a dropdown. we have a textbox and
    > dropdown on the page, user is suppose to enter in a zip into textbox,
    > then the dropdown should load the state based on the zip. we can pull
    > the state from the database on a zip match table, but how do we preload
    > the dropdown, is there a way without posting back?
    >
     
    Steven Burn, Oct 27, 2005
    #2
    1. Advertising

  3. phil2phil wrote:
    > hi,
    > had a question on preloading a dropdown. we have a textbox and
    > dropdown on the page, user is suppose to enter in a zip into textbox,
    > then the dropdown should load the state based on the zip. we can pull
    > the state from the database on a zip match table, but how do we
    > preload the dropdown, is there a way without posting back?


    You'll have to postback. This can be done without submitting your form by
    using the XMLHTTP object. Google for that term to get an overview and some
    examples of its use. Followup questions can be posted to a client-side
    scripting newsgroup such as m.p.scripting.jscript

    HTH,
    Bob Barrows
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Oct 27, 2005
    #3
  4. phil2phil

    Patrice Guest

    Don't know how it works exactly over there...

    You could have the whole list (basically the first few numbers of the zip
    and the corresponding state ?) rendered as a JavaScript array and select the
    appropriate records when the zip code is entered... This way you won't have
    a postback. It assumes the list is quite short...

    --

    "phil2phil" <> a écrit dans le message de
    news:...
    > hi,
    > had a question on preloading a dropdown. we have a textbox and
    > dropdown on the page, user is suppose to enter in a zip into textbox,
    > then the dropdown should load the state based on the zip. we can pull
    > the state from the database on a zip match table, but how do we preload
    > the dropdown, is there a way without posting back?
    >
     
    Patrice, Oct 28, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,246
  2. Joan

    preload filechooser

    Joan, Aug 1, 2005, in forum: Java
    Replies:
    2
    Views:
    378
    Knute Johnson
    Aug 1, 2005
  3. Marcus Leon

    How to preload jar classes?

    Marcus Leon, Oct 3, 2005, in forum: Java
    Replies:
    4
    Views:
    2,675
    Marcus Leon
    Oct 4, 2005
  4. Morris

    preload images

    Morris, Nov 12, 2003, in forum: HTML
    Replies:
    5
    Views:
    607
    Beauregard T. Shagnasty
    Nov 14, 2003
  5. Mike Johnson

    Preload graphics

    Mike Johnson, Nov 28, 2003, in forum: HTML
    Replies:
    9
    Views:
    2,317
    Mike Johnson
    Dec 9, 2003
Loading...

Share This Page