In a dynamic form you will not know what the page number is so you cannot use that technique....but you can put the cursor in a field using xfa.host.setFocus("fieldName").
I have seen other people put a small 1pixel by 1pixel field on the top of the page (make the field have no borders and have the foreground and background color the same colour as the page) then set your focus to that field. The user will not know it is a field (because it is so small).
Paul