So I currently have a listbox which dynamically generates its members from the database. It has name and id set to "availablePets".
When one of the items in the list is clicked I want to populate some other fields on the screen by quering the database for the rest of the data surrounding that one entry.
I am not sure how to link the onchange event to a javascript/jquery function that will in turn allow the page to fire off PHP again and populate the data? I gather that I will need to probably use jquery to do a ajax post to trigger the PHP?
Pointers in the right direction for resources on the topic would suit fine as this is uni work or some discussion around what logic is needed. I should be able to figure out the code.