I am a newb when it comes to JSON and am wanting to try to write a JSON select option autofiller, but do not know where to start.
The way my script works currently is using PHP and MySQL to fill the first set of select options with a distinct list from a DB table and then upon a user selection the next set of select options are autofilled with options that are linked to the first set. Is there anyway to do this in JSON?
Sure. Lets say you have some simple JSON:
Then, you evaluate that to JavaScript:
Then, you simply create each option in the dom (I’ll use jQuery for brevity sake)
Or something similar to this effect.