Jump to content

Dynamic Select without reloading the page?


tblade

Recommended Posts

I am building a form that needs to have 3 select 'dropdowns' all three are filled from a database, where the last 2 are dependent on the one above it.

 

all three are calling out of different tables/databases (which is to be expected) the first dropdown (dd) pulls from a database with 2 columns 'category' 'cat_id'

 

depending on what is selected the second dropdown is loaded pulling everything with a matching 'cat_id'

the second database has 3 columns 'subcategory', 'cat_id', and 'cat_code' (the cat_code is a string value).

 

the third dd is then populated based on the 'cat_code' and pulls a value called name.

 

I am new to php and ajax and i have limited java script experience. I have to make sure the dd reload without reloading the whole page so setting variables to outside the page with get or post is out of the question (otherwise i would have this finished)

 

Any help I do have the first dd autopopulating when the page is called but if it needs to be re-worked thats fine too any help would be greatly appreciated

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.