Jump to content

Ajax populated dropdown list


chapeen

Recommended Posts

Hi everyone,

I have a registration form.

I have 1 dropdown list that contains the country name, when a user selects a country a second

dropdown list gets populated with states/province using jquery, that works fine.

 

When a user wants to modify his account, how do I populate those 2 dropdown list using jquery?

I have a doubts on how to do this.

Link to comment
https://forums.phpfreaks.com/topic/178596-ajax-populated-dropdown-list/
Share on other sites

Hi,

Why do you want to populate it with jquery (when modifying)?

As you already have the country and province, surely you can populate the province dropdown list in the *normal* way - ie do a direct select from your database using the country id to select the provinces and the provinceid to mark it as selected.

 

Chris

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.