It is not really good to use a href='javascript:document.formi.submit();'
I thought, you just want to know in general, where a form goes. Now I see, you want to use it yourself. But to help you, we will need your code.
If your form has an action and you point it to another page, it will go there when you submit it, irrespective of the method you use for the submit. Just post your code and explain what exactly you want.