How to use JS to jump to a specific place in a page? Tried scrollIntoView, not working
<p>I have a PHP form for discussions. Each message has its own response button, which is dynamically generated. I'm using javascript in the button to make a response form visible at the bottom of the page, but I can't for the life of me get the page to jump down to the form once it's visible. This is a problem for pages that have a lot of discussions on it, as some users may not know to scroll down and will just think the button didn't work.</p>

<p>Here's what I have now for my button code:</p>

<pre><code>&lt;a href="#" onClick="changeVisibility(3,'responseForm')"&gt;&lt;img src="images/reply.jpg" border=0 /&gt;&lt;/a&gt;
</code></pre>

<p>The changeVisibility function looks like this:</p>

<pre><code>function changeVisibility(parentID, elementID) {
  document.getElementById(elementID).style.visibility="visible";
  document.forms[0].parent_id.value=parentID;
  var el = document.getElementById(elementID);
  el.scrollIntoView(true);
}
</code></pre>

<p>In my form, I have a div whose id is set to responseForm. When clicking the button, the div does become visible, but the scrollIntoView is not working - I have to manually scroll down to see it. Any ideas?</p>
