Select Options

Results 1 to 3 of 3

Thread: Select Options

  1. #1
    HUM Guest

    Default Select Options

    I want to populate a combo box(from the database) based on the values selected from another combo box. How should I work around this ? <BR>What should be used Javascript or vbscript ?<BR>I am using HTML dropdown control ?<BR>What all properties can be used?<BR>If client side Javascript is used to write onchange event of <BR>the first dropdown box how should ASP script be called to query the database. How to refer to second dropdown&#039s clear property ???

  2. #2
    Join Date
    Dec 1969

    Default RE: Select Options

    Hi,<BR><BR>This is a trick I often use to create virtual client-server "messaging". Use 2 frames, one taking up the entire browser screen (100%) and the other hidden (*). On change in the first drop-down list, target the form into the hidden frame and submit it. You can use any kind of server-side support to do the data access - just return some Javascript code to run on document-load. Basically, this code should reference and manipulate the second dropdown box located within the "sister" frame.<BR><BR>I think that you need to explicitly clear each option item using the document.myForm.mySelect.options array. In IE its: options.remove(i). In Netscape its: options(i) = null.<BR><BR>If you&#039re going to use this in a pop-up window don&#039t forget to enable the status bar so that the user can see that something is going on behind the scene.<BR><BR>Cheers,<BR><BR>Joe

  3. #3
    Join Date
    Dec 1969

    Default RE: Select Options

    For a working example, with source code, see<BR><BR><BR><BR>and the next to last example listed on that page.<BR><BR>

Posting Permissions

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