andreheller Posted December 1, 2020 Posted December 1, 2020 Site URL: https://www.flexihouse.co.nz/ I would like to paste some code in a forms, POST-SUBMIT HTML section. So once the form is filled in, a different website open in a new tab. The simple POST-SUBMIT REDIRECT does not work for this as it opens in the current tab. Any help much apprectiated.
tuanphan Posted December 5, 2020 Posted December 5, 2020 Have you solved it yet? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
arie Posted June 16, 2021 Posted June 16, 2021 I am looking for this answer as well? Anybody any thoughts on this? In my case, it's opening a post-submit redirect url in a new tab.
Guest Posted October 1, 2021 Posted October 1, 2021 I am in this situation too. Any luck on finding code?
creedon Posted October 1, 2021 Posted October 1, 2021 You can use the Post-Submit Message HTML field and add the following. <script> const url = 'http://www.tomsWeb.consulting/'; open ( url, '', 'target=_self' ); </script> Let us know how it goes. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
Guest Posted October 4, 2021 Posted October 4, 2021 On 10/1/2021 at 4:29 PM, creedon said: You can use the Post-Submit Message HTML field and add the following. <script> const url = 'http://www.tomsWeb.consulting/'; open ( url, '', 'target=_self' ); </script> Let us know how it goes. Thank you! It works but it opens a new window. Is it possible to just open the page in a new tab?
creedon Posted October 4, 2021 Posted October 4, 2021 54 minutes ago, chloe14 said: It works but it opens a new window. Is it possible to just open the page in a new tab? Here is an alternate way to do it. <script> const url = 'http://www.tomsWeb.consulting/'; location.href = url; </script> Let us know how it goes. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
AndySands Posted June 29, 2022 Posted June 29, 2022 On 10/5/2021 at 6:26 AM, creedon said: Here is an alternate way to do it. <script> const url = 'http://www.tomsWeb.consulting/'; location.href = url; </script> Let us know how it goes. Hi there, Bringing up an old post here but I have tried this code and it still opens in the current tab. Any other idea how I can have a page (or preferably a live PDF file) open in a new tab? Thank you!
creedon Posted June 29, 2022 Posted June 29, 2022 (edited) 14 hours ago, AndySands said: how I can have a page (or preferably a live PDF file) open in a new tab? <script> const url = 'http://www.tomsWeb.consulting/'; open ( url, '', 'target=_blank' ); </script> Let us know how it goes. Edited June 29, 2022 by creedon MaryPhilip_ 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
jahsoka Posted March 30, 2023 Posted March 30, 2023 Thanks to creedon for getting some good options here! I was able to get it to open in a new tab by using a slight variation of his code: <script> url = 'https://forum.squarespace.com'; open(url, '_blank'); </script> creedon 1
wpr452 Posted May 2, 2023 Posted May 2, 2023 I can't get any of the code snippets to work anymore, but they did a few months ago? Not sure what happened. We need the post-form submission to redirect to a file that ideally opens in a new tab/window, but we're not picky. Does anyone have any updated ideas on how to achieve a redirect-URL post form submission that opens in a new tab OR window? Thank you!
creedon Posted May 2, 2023 Posted May 2, 2023 (edited) On 5/2/2023 at 7:05 AM, wpr452 said: I can't get any of the code snippets to work anymore, but they did a few months ago? They no longer work because SS changed how forms work. Quote Does anyone have any updated ideas on how to achieve a redirect-URL post form submission that opens in a new tab OR window? Forms of the past were relatively easy to manipulate the redirect mechanism. The new forms are hard, as far as I can tell, and I know of no code currently that can manipulate the redirect. Edited May 3, 2023 by creedon Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment