The issue here: you are trying to accomplish browser control upon form entry, not server control. This, in itself, makes it rather OT for this forum. Not that the esteemed Mr. Weedpacket and I might not be able to help, but it's not particularly why we are here.
Since this is a Javascript issue, you'd probably do well to take it to one of the forums dedicated to such things. IIRC, javascript.internet.com is a sister board to this one, and might serve.
That said, check the following.
Do you have all the necessary Javascript in your page? Note that the example you cite uses an off-site include.
Have you debugged your Javascript?
Are you certain of your browser configuration?
Possible workarounds:
A. Set your form action to "actionpage.php?scroll=yes", and instruct PHP to echo, if $scroll is TRUE, some little Javascript snippet (I'm thinking something like '<body onLoad="myScroll">') where myScroll() calls the focus method on the next field in your form. You'd have to name the next field, of course, and write a valid myScroll() function in Javascript.
B. Given the fine-grained browser control allowed by Javascript, (and why shouldn't it be able to do so, it certainly requires enough typing 😃 ), I don't see any reason why Weedpacket's suggestion couldn't be performed just as easily, or perhaps moreso, than my above. An anchor tag within the document could easily be called with body onLoad, as above, and a call to document.url or window.location or somesuch (haven't bothered to memorize the umpteen pages of JS objects, myself)....