<style type="text/css"> .dropdown{ display: none; } </style> ... <script type="text/javascript"> function show(){ document.getElementById( "dropdown" ).style.display = "block". } </script>
As for diagnosing the problem with the innerHTML, I don't have enough information to help you with that. Your code looks fine from what I can tell. It may be something else that's the problem.