javascript - PHP file - Populating a dynamic <select> tag with values from a database issues -


okay problem have form contains select tag needs dynamically populated database, values populated determined postcode/zipcode user enters without submitting form.

for example postcode of 1234, drop down list contain values x1, x2, x3 if postcode of 4321, drop down list contain values y1, y2, y3

i have done testing , sql statement fine, can populate tag on submitting form, yet dont know how implement on how without submitting page.

i understand difference between js , php, onblur() js function used dynamically change drop down device, calling php function or having embedded php code somehow inside...

im stumped on how javascript or php..(since it's assignment) , yes have looked on how this.

you need onchange() , ajax method re-load select

https://developer.mozilla.org/en-us/docs/web/api/element.onchange

so once select option select tree re-loaded via ajax


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -