Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
selcting values from table
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 03/20/11 21:09 
I want to try this and see if this may be an easy way of doing this
table format
city_id
state
county
ciy

so what I want to do which is similar to another way with different tables buta little different

Select State <all states show>
state selected take me to a list of counties under the state
county selected take me to a list of cities in that county

will this still require java if all in the same table


_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 03/22/11 21:41 
Yes - basically you would be doing some sort of AJAX call onchange for the select element.

Kyle


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
jamesd116



Joined: 05 Jun 2006
Posts: 1559
Location: Rochester Pa

Posted: 12/01/11 20:52 

smith.kyle:
Yes - basically you would be doing some sort of AJAX call onchange for the select element.

Kyle


how wouldi use the onchange ihave been searching the internet but I do not know how to implement it with the form contoller
asampleifound wasthis

Code
onchange="getState(this.value)"><option>Select Country</option><option value="1">USA</option><option value="2">Canada</option>       </select></td>
  </tr>


the form portion is

Code
  $sql = "SELECT state_name FROM {$jamroom_db['ecmStates']}";
    $_rt = dbQuery($sql, 'NUMERIC');
    foreach($_rt as $row){
      $ecmStates[] = $row['state_name'];
    }
    jmSelect($language['ecmModule'][30],'state_name', $ecmStates, $_post['state_name']);


at this point the list ofstates ispulling up sonowi want to have it when i select a stateit will pull from the list of counrties associated with the state
i believe this is being done with ajax if that helps.
and i want it pulling from the db again thiscode has the info already in the coding but that will not work for me thanks


_________________
One day the court system will learn that a childs mother is not the only option...... Question is will it be too late by that time...
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.