Conditional Form Inside an Iframe

Hi everyone,

I am using conditional forms with the following script:

<script>

$("#selector").live('change', function() {
 
  switch ($(this).val()) {
      
    case 'OptionA':
        window.module.lp.form.data.url = "https://www.google.com";
        break
    case 'OptionB':
        window.module.lp.form.data.url = "https://bing.com";
        break;
  }
  
});
  
</script>

The form is in an iframe, so I want the choice of ‘OptionB’ to open in the parent frame or new tab.

I changed the line to this:

case 'OptionB':
            window.open("https://bing.com", "_blank");
            break;

But the new window opens on the drop-down selection and not on the form submit. Any suggestions to changing the javascript so on the form submit, the URL opens in the parent frame or new tab?

For context, this is a multistep funnel whereby each step in the funnel is an individual page, displayed inside an iframe on a landing page.

Thanks in advance for your help!