The problem here is that you first have to save the document (at the end of your SSJS code). Then you are able to compute the URL you have to open, e.g.
context.redirectToPage("doc.xsp?action=editDocument&documentId=" + newDoc.getUniversalID()
Another way could be: you store the temporary values in scoped variables, open the blank document xpage and prefill the fields with the values from the scoped variables. This way is elegant as you don't have to remove the temporary document created with the first method in the case you want to dismiss it. Keep in mind: please do not store Notes objects (such as the newDoc object) in a scoped variable as it is not ensured that it will be there after loading another page...