how to return to anchor after post
<p>I have an application that creates quotations, orders etc. and as the user adds items the page reloads and can quite long. The problem is then the user has to scroll down to the last item to add another one - this gets to be quite time-consuming. Is there a way I can get it to do this automatically? I have tried putting anchors on each line item like this;</p>

<pre><code>echo "&lt;form action='display_quotation.php' method='post'&gt;\n";
echo "&lt;input type='hidden' name='quote_id' value='$quote_id'&gt;\n";
echo "&lt;input type='hidden' name='item' value='$detail_number'&gt;\n";
echo "&lt;a name='item_$detail_number'&gt;&lt;/a&gt;\n";
</code></pre>

<p>and put the javascript ;</p>

<pre><code>echo "
&lt;html&gt;

&lt;head&gt;
&lt;meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'&gt;
&lt;style type='text/css'&gt; table {font: 13px arial} &lt;/style&gt;

&lt;script type='text/javascript'&gt;
function goToAnchor() {
    window.location.hash='item_$item';
}
&lt;/script&gt;
&lt;/head&gt;

&lt;body onload='goToAnchor();'&gt;\n";
</code></pre>

<p>This doesn't seem to work - I get in the URL  <a href="http://my_domain/display_quotation.php?#item_3" rel="nofollow">http://my_domain/display_quotation.php?#item_3</a> but the page always goes to item 2 no matter what item is passed via post.</p>
