open external page and posting to external form

Highlighted
New Contributor

Hey team,

I have tested in preview mode the ability to open an external page by using the javascript command 

var domain - 'xyz';

var myPopup = window.open(domain + '/dns', 'myWindow' , 'width=800,height=800,resizeable,scrollbars');

 

The page is loading with a malformed url https://blog.xyz.com/://www.xyz.com/dns

I am also creating a dynamic form to post within this new window.  The usage is for ccpa in a larger enterprise setting and we need to be able to post current settings to a central location.

 

I am getting Request Forbidden message that I did not receivein preview mode while developing.  

 

Is there any setting we can change to allow these types of actions or is there a workaround? 

Need some help asap.

Thanks.

Reply
0 Upvotes
2 Replies 2
New Contributor
Window.open requires a fully qualified URL (including the protocol “https://“ etc) to open a different domain.
Reply
0 Upvotes
Advisor

What you are trying to do is going to have very mixed results. Many pop up blockers will block the window.open javascript command as a pop up.  If you simply need to repost data from a Hubspot form to another location for CCPA, then you will need to utilize the Hubspot API to achieve this and repost the data through ajax or another method to your secondary posting server.