Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old August 13th, 2007, 08:39 AM
Newbie
 
Join Date: Aug 2007
Posts: 1
Default quick search

in my project i had 2 dropdownlists one for the table names and the other for the field(coliumn names) to be displayed.the second dropdown list options should be
displayed regarding to the changes in the first drop down list.how can i do this?
eg:in dropdownlist 1 i had rhe tables as options eg;resumes,clients,..
when i select the clients in the firstdropdownlist ,then i should get all the fieldnamesin the second drop list can any one help me in this issue?
Reply
  #2  
Old July 8th, 2008, 10:14 PM
Expert
 
Join Date: May 2007
Posts: 179
Default

You will probably want to use Ajax to fill list 2 based on list 1 selection. For instance, making a selection in list 1 will fire an onchange Ajax call. This will run a controller method to return the table fields and replace list 2 with that data. This page might be helpful. You can get all the field names in a table using Model.column_names, where Model is the name of your specific model.
Reply
Reply

Bookmarks

Thread Tools

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

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

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles