CodePen

HTML

            
              
<!-- for http://stackoverflow.com/questions/16926929/javascript-innerhtml-calls-onclick-function/16927116#16927116 -->
<div id="oldnews">Old News...</div>

<a href="oldnews" id="toggle">View older news...</a>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              var toggle = document.getElementById('toggle')

toggle.addEventListener('click', function(e){
  e.preventDefault(); // prevent click from firing
  var target = document.getElementById("oldnews"); // href="oldnews"
console.log(target);

  target.style.display = (target.style.display == 'none') ? 'block' : 'none';


});
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................