Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
dynaically pulling counties with state selection
jamesd116



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

Posted: 02/04/11 15:06 
Brfore I go any further I want to make sure I can get this to work due to the amount of work for the cities that are included in doing this.
I have 3 tables in the db I want to be able to pull the something like this
User selects Pennsylvania
{if} selects state from state table then
pennsylvania counties will be given table set up as county_id county_name state_id
in this case it would pull the
{$state_id=39} all counties which have the 39 as the state id is what would show. Same thing again
{if} Beaver county is selected for Pennsylvania then it the cities would draw from the id in the same manner
{$county_id=1700} then all of the cities within the County of Beaver would be selected then this would all go to the users State/County/City fields which i am also adding to the db therefore giving users a better search for local locations. Here is what I have so far just basic coding for now


Code
<?php
// make sure we are not being called directly
defined('IN_JAMROOM') or exit();

    // retrieve saved data from session
    $_rep = getForm('ecmLocations');
    jmHtmlBegin($language['ecmLocations'][1]);
    jmBodyBegin();
    jmSpanCell($language['ecmLocations'][1],'',30,'html_modify.png');
    jrGetFormNotice();
    jmBeginForm('ecmLocations.php?mode=save');
    jmSelect($language['ecmLocations'][100],'state_name',$_rt);  <<<<table = ecmStates>>>>>>
    jmSelect($language['ecmLocations'][101],'county_name',$_rt);<<<<table = ecmCounties>>>>
    jrFormSubmit($language['supTicket'][2],false,false,'admin.php?s=section_ecmLocations');
    jmEndForm();
    jmBodyEnd();
    jmHtmlEnd();
    exit;

Thats saying that any of this is possible to do with php ont he research i been doing seems like you could use ajax asp or java.
Thanks

Also is there anything within JR that sayys I shouldnt use this in the band_info db for location_state location_county location_city instead of creating another table or would this mess with the core JR db too much


_________________
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
jamesd116



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

Posted: 02/11/11 16:55 
someone....anyone everything i have tried didnt work as of now


_________________
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: 02/11/11 19:05 
I'm not quite sure what you are trying to do - are you trying to make it dynamic? If so, you'd need to do something with javascript or jquery.

Kyle


_________________
kyle[at]jamroom.net

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

I get bored when no one's posting...
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.