I have a form in pager, so user can enter page he want's to view. But I can't figure out how to go to that page number in form submit.
Most drupal pagers work by setting a
?page=XX in the url. So a simple solution would be to set the url to mimic that, entering the number entered by the user in the url.
This might break if the pager argument in the url changes (like if you have multiple pagers on a single page etc), but this might cover your needs.