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

Self populating drop down lists.

LEGEND ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

Is there any tutorials or information to do a self populating drop down list
in CF?

I assume you would have the form post back to its self using a IsDefined for
each drop down step. Drop Down 1 (DD1) is selected and that posts back to
the same page and causes the DD2 to run a SQL query based on DD1's choice
and you repeat the process until the final DD is selected.

Is this correct and where can I find a good tutorial?

Thanks

--
Wally Kolcz
Developer / Support


TOPICS
Advanced techniques

Views

479

Translate

Translate

Report

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 ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

Do a search on Google for "related selects in ColdFusion".

--
Bryan Ashcraft (remove brain to reply)
Web Application Developer
Wright Medical Technologies, Inc.
------------------------------------------------------------------
Macromedia Certified Dreamweaver Developer
Adobe Community Expert (DW) :: http://www.adobe.com/communities/experts/


"Wally Kolcz" <wkolcz@projectproofing.com> wrote in message
news:e7c9hc$g6a$1@forums.macromedia.com...
> Is there any tutorials or information to do a self populating drop down
> list in CF?
>
> I assume you would have the form post back to its self using a IsDefined
> for each drop down step. Drop Down 1 (DD1) is selected and that posts back
> to the same page and causes the DD2 to run a SQL query based on DD1's
> choice and you repeat the process until the final DD is selected.
>
> Is this correct and where can I find a good tutorial?
>
> Thanks
>
> --
> Wally Kolcz
> Developer / Support
>


Votes

Translate

Translate

Report

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 ,
Jun 21, 2006 Jun 21, 2006

Copy link to clipboard

Copied

The yielded a wealth of knowledge. Thanks a ton!!


Votes

Translate

Translate

Report

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 ,
Jun 22, 2006 Jun 22, 2006

Copy link to clipboard

Copied

very welcome.

--
Bryan Ashcraft (remove brain to reply)
Web Application Developer
Wright Medical Technologies, Inc.
------------------------------------------------------------------
Macromedia Certified Dreamweaver Developer
Adobe Community Expert (DW) :: http://www.adobe.com/communities/experts/


"Wally Kolcz" <wkolcz@projectproofing.com> wrote in message
news:e7ch6s$otq$1@forums.macromedia.com...
> The yielded a wealth of knowledge. Thanks a ton!!
>


Votes

Translate

Translate

Report

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
Contributor ,
Jun 22, 2006 Jun 22, 2006

Copy link to clipboard

Copied

If your record count is not too large, preload data into form and populate selects dynamically using JavaScript.

Votes

Translate

Translate

Report

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 ,
Jul 12, 2006 Jul 12, 2006

Copy link to clipboard

Copied

Actually, I would like it to simply invoke a cfif that has 2 versions of the
drop down menu. One list would have 2 options and the other would have 4.
After the first dropdown is selected, the choice from that would invoke the
next cfif and it would choose between the two.

Something like:

<cfif Form.memtype EQ 'sb'>
<select name="projects" class="maintext" id="projects">
<option selected="selected">Choose One</option>
<option value="10">10</option>
<option value="Unlimited">Unlimited</option>
</select>
<cfelse>
<select name="projects" class="maintext" id="projects">
<option selected="selected">Choose One</option>
<option value="10">10</option>
<option value="25">25</option>
<option value="50">50</option>
<option value="Unlimited">Unlimited</option>
</select>
<cfif>

I know that is wrong, but it is the general idea. Is that at all possible. I
wouldn't think it would have to be database driven.


Votes

Translate

Translate

Report

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
Contributor ,
Jul 12, 2006 Jul 12, 2006

Copy link to clipboard

Copied

LATEST
I don't think you fully understand how ColdFusion works. ColdFusion is on the server side. You can't 'invoke' the cfif once the page is loaded. CF runs BEFORE the HTML page is loaded. You could use CF to populate the dropdowns and then use JavaScript to provide the functionality you are looking for. Search these forums, this question has been answered before.

Votes

Translate

Translate

Report

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
Resources
Documentation