Hi, I'm trying to insert a select html element in a div section of a web page by clicking a link whose href property containts a hash (#). To my big surprise, after the click on the link, the select element appears on the page but the source code of the generated page does not contain any <select>...</select> tags in the appointed div.
I do this by selecting the div element like this: var $select = $('<select><option value="1">Option1</option></select>'); $('#cent').html($select); div#cent is written manually and I want to add the select element inside of it. What is the problem for the html() method? It shows the expected result on the page but fails to insert real select tags on the page. Subsequent action on the select element by for exemple a server language (ex PHP) yields no result as the select element do not exist physically on the page. What can I do to see the inserted tags on the page?
In your example, though, you've forgotten to give the select element a name, and therefore it will not get submitted to the server.