Adobe Dreamweaver Forums



Last 10 THreads :         linecount property not found (Last Post : Patch - Replies : 2 - Views : 3 )           »          User Directory Connection failure (Last Post : Dominic Michael - Replies : 2 - Views : 5 )           »          Captivate 3 / SABA LMS issue (Last Post : MamaCich - Replies : 6 - Views : 10 )           »          Stitching Images Together - Panoramic Views (Last Post : Simon RCL - Replies : 2 - Views : 3 )           »          flash player 10 very slow to initialise (Last Post : xloxlox - Replies : 1 - Views : 9 )           »          text justification (Last Post : forexsystemprofi - Replies : 6 - Views : 7 )           »          Web-tier compiler is not for production use (Last Post : puja mantri - Replies : 0 - Views : 1 )           »          call function, pass value, access variable in movieclipclass from main stage (Last Post : Joergen N - Replies : 1 - Views : 2 )           »          div tags (Last Post : malcster2 - Replies : 4 - Views : 5 )           »          Rate My Site Please (Last Post : Ian Edwards - Replies : 4 - Views : 5 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Cold Fusion
 
Tags: ,



Reply
  #1 (permalink)  
Old 08-28-2008, 03:43 PM
idesdema
 
Posts: n/a
Diggs:
Default Dynamic dropdown

I can't test this because I don't have a server running. But I do want to know
if this will work. I'm trying to populate a dropdown based on another
dropdown's value...

<select name="test_select">
<option selected value=""></option>
<option value="bill">bill</option>
<option value="john">john</option>
<option value="andy">andy</option>
</select>

<cfif IsDefined(#form.test_select#)>
<cfquery name="test_select" datasource="mydsn" maxrows="25">
SELECT id,first_name,last_name FROM my_db WHERE first_name = '#test_select#'
</cfquery>
<select name="first_name">
<cfoutput query="test_select">
<option value="#id#">#first_name# #last_name#</option>
</cfoutput>
</select>
</cfif>



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-28-2008, 07:41 PM
idesdema
 
Posts: n/a
Diggs:
Default Re: Dynamic dropdown

I should have said that upfront. CF7. I am beginning to hate CF7 based on all the new stuff that came out with 8. cfimage is one and ajax functions are another.

I need a solution for cf7.


Reply With Quote
  #3 (permalink)  
Old 08-28-2008, 07:41 PM
Dan Bracuk
 
Posts: n/a
Diggs:
Default Re: Dynamic dropdown

50 arrays? Why do you need 50 arrays.

In any event, it sounds like you might have too much data to do this on the client. How many total river/state combinations are we talking about?
Reply With Quote


  #4 (permalink)  
Old 08-28-2008, 07:41 PM
idesdema
 
Posts: n/a
Diggs:
Default Re: Dynamic dropdown

Maybe I'm wrong on the arrays...

Last time I did the local project the setup was something like

Field 1

Field 2(1)(1)
Field 2(1)(2)
Field 2(1)(3)


But anyway. I'd say on average each state has about 30-40 rivers I have
stored. Some states are far less and some are far more. Wisconsin for example
has about 100 records.




Reply With Quote
  #5 (permalink)  
Old 08-28-2008, 07:53 PM
Dan Bracuk
 
Posts: n/a
Diggs:
Default Re: Dynamic dropdown

For that many records you may want to go page to page. The user picks a state
on page 1 and the available rivers come up on page 2.

Make sure you test with Wisconsin to see what the most user freindly way is to
present 100 river names. I'm guessing you won't put them in a drop down.

Reply With Quote
  #6 (permalink)  
Old 08-28-2008, 07:53 PM
idesdema
 
Posts: n/a
Diggs:
Default Re: Dynamic dropdown

Yeah I was trying to get around that but that may be the way I go. Really I
want to do an ajax solution but every recommendation has been to get jquery and
learn json and yatta yatta. I am pretty lazy.

Reply With Quote


  #7 (permalink)  
Old 08-28-2008, 08:13 PM
Ian Skinner
 
Posts: n/a
Diggs:
Default Re: Dynamic dropdown

idesdema wrote:
> Yeah I was trying to get around that but that may be the way I go. Really I
> want to do an ajax solution but every recommendation has been to get jquery and
> learn json and yatta yatta. I am pretty lazy.
>


There is also CFAJAX and CFCAJAX that predate CF8 and work well.

You may want to also consider an 'auto suggest' feature that filters a
list as a user types the first few letters.

But that depends on what the goal of the user is. Do they know the name
of the river they want to select or are many going to be browsing them all.
Reply With Quote
  #8 (permalink)  
Old 08-28-2008, 09:16 PM
Dan Bracuk
 
Posts: n/a
Diggs:
Default Re: Dynamic dropdown

Even if you had an ajax solution, you still have to decide how you want to present up to 100 options to your user. I wouldn't want to be the user if that was in a drop down.
Reply With Quote
  #9 (permalink)  
Old 08-28-2008, 09:16 PM
idesdema
 
Posts: n/a
Diggs:
Default Re: Dynamic dropdown

I have already decided. I don't want to do auto suggest because the value has
to be exact. Unfortunately for the user, they are going to get 100 options
like it or not.

I will be using auto suggest for search but not for this.

Reply With Quote


  #10 (permalink)  
Old 08-29-2008, 02:02 AM
Dan Bracuk
 
Posts: n/a
Diggs:
Default Re: Dynamic dropdown

You may or may not have considered displaying the rivers as html text with links to the next page.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 10:57 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk