Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Dependent dynamic dropdown lists (ASP/VBScript)

Guest
Sep 19, 2012 Sep 19, 2012

DW3 - ASP, VBscript

My insert record form has two particular dynamic dropdown lists I'd like to create dependency for.  List two should propogate items based on list one.  The tables are related.  What is the most practical, easiest approach in doing this?

[Subject line edited by moderator to indicate server model]

TOPICS
Server side applications
5.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 20, 2012 Sep 20, 2012

I'm not really an ASP Pro. But this link should help you:

http://examples.codecharge.com/CCSExamplePack2/DependentListBox/DependentListBox_desc.php

http://forums.asp.net/p/1101919/2275534.aspx

There's also an AJAX implementation that my team uses a lot which you can take a look at. Makes it very easy for you - http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/CascadingDropDown/CascadingDropDown.aspx

Sorry please ignore the first link posted earlier. It's only if you buy CodeCharge studio. If you're ready to purchase, here's the link: http://www.codecharge.com/index2.php

Message was edited by: Sudarshan Thiagarajan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 20, 2012 Sep 20, 2012

HI, thank you for your reply.

I'm using Classic ASP, so ASP.net code doesn't help.  I realize I'm looking at either onchange event(s) with function, or AJAX, but am having a very hard time finding good examples out there.  I haven't written functions from scratch yet and was hoping to find an example that I could use and manipulate.  My only concern using javascript is that very small percentage that has it disabled.  Although javascript seems to be the easiest way to go.

I've done the whole dropdown dependency thing to return records via submit onchange, but this is a bit different with an Insert Record behavior.  I certainly don't want it submitting prematurely, and I can't have the page refresh if other fields are filled out.

My dropdown options are dynamic, not static.  My two tables are simple and tied together via TypeID (PK/FK), so I basically need the first dropdown to tell the second dropdown to use the same TypeID (once picked) without submitting or refreshing. 

I have a feeling this is a fairly simple task, I just need a good example to get me started. Here are my tables:

tbl_types

typeID (pk)

type

tbl_items
itemID

item

typeID (fk)

If it's more appropriate for me to join a Classic ASP forum for this, I will and suggested sites are welcome.  I only use this forum because I'm using DW and ASP, and the title of the forum reads  "Dreamweaver Application Development: PHP/MySQL, ASP, Coldfusion."

Any help is appreciated.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 20, 2012 Sep 20, 2012

You can post on other forums if you feel like.

In the meantime, we can wait for a Subject Matter Expert to respond here.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 24, 2012 Sep 24, 2012

For others struggling with dynamic dropdown list dependency, there is an awesome inexpensive DW extension out there that will do it all and the support is fantastic: http://www.tecnorama.org/document.php?id_doc=62

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 17, 2012 Nov 17, 2012

Hi Chris,

Thank you for the tip. You are right! I had a quick look. It looks like a database based dynamic dependency drop down solution. Which probably is a better way of building up the dependency if you have a large set? I think I need a smaller set. I have a chice of 3 locations, each location has 2 - 3 rooms. User will first pick the location and then the appropriate option for that location will be presented for user to select. I want it hard - coded but not dynamic with a table of values.

I appreciate this tip. You are right price is reasonable!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 17, 2012 Nov 17, 2012
LATEST

Glad to help.  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Nov 17, 2012 Nov 17, 2012

Hi,

This link is dead! -

: http://www.codecharge.com/index2.php

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines