Results 1 to 2 of 2

Thread: How many options in the dropdown..

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    343

    Angry

    Hello,

    I have a page "pageOne", with a dropdown menu on it which dynamically changes according to user input - eg the user can add/delete entries/options from the dropdown. On this page I have a submit button, which when clicked posts to another page "pageTwo". In "pageTwo" I want to write some script, preferably ASP, to determine how many options/entries the dropdown on "pageOne" has.

    The reason why I want to do this is because I then want to "build" x amount of textboxes on "pageTwo" (on the fly) - where x is the amount of options which the dropdown on "pageOne" had.

    Thanks,
    T

  2. #2
    Lively Member
    Join Date
    Jan 2001
    Posts
    118
    Don't kill me if I'm wrong, but...

    If you submit the COMBO box , it will only submit the value the user selected in the box.

    If i was u, i would when then user press the submit button, run thru code on client side to deterine how many options are there.

    Send the value to your page2 as a hidden field. This is vbscript you might want to use to determine how many options are there.

    <Script language = "vbscript">

    function gettotal()
    dim total

    total = document.combo1.length
    form.total.value = total
    form.submit

    end function

    </Script>

    Hope it helps!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width