New browser window

Alex Koshel asked on March 31, 2021 13:57

Hello. I have online Form (via Form builder), after submit, opens a *.pdf file in the same window. here is her back end

viewBiz.RedirectUrlAfterSave = GetRedirectURL(false);

private string GetRedirectURL(bool downloadURL)
    {
        var uploadedDocumentGuid = RequiredDocumentInfo.RequiredDocument?
            .GetValue(DocumentPDFPageType.UploadDocumentPortalName)?.ToString();
            if (uploadedDocumentGuid == null) return "~/404error.aspx"
            var guid = Guid.Parse(uploadedDocumentGuid);
            var attachment = DocumentHelper.GetAttachment(guid, SiteContext.CurrentSiteName);
            return $"~/getattachment/{uploadedDocumentGuid}/{attachment.AttachmentName}.aspx"
                       + (downloadURL ? "?disposition=attachment" : string.Empty);
      }

I want the document to open in a new tab after submit, and the current tab is redirect to google.com (for example). I think on the page put web part JS (In line script, In-line script page location: on submit statement) JS: window.open ('some url'); But it doesn't work

   Please, sign in to be able to submit a new answer.