When you click on a fruit it will call a function that grabs the element, extracts its contents and sends it to a php file with a POST argument that goes like "user_pref_fruit=appeles"
The server will give some answer that will be put into a DOM document. It's contents are: