How to link to an external site

I had everything working. But I realized I needed to use one of MailChimp’s landing pages and not a form inside for Wix. For some reason, I can’t link to an external page. It works if I use internal pages.

Thoughts?


import wixData from "wix-data";
import wixWindow from 'wix-window';
import wixLocation from 'wix-location'; 

export function searchzip_click_1(event) {
 let SearchValue = $w("#searchbar").value
  $w("#dataset2").setFilter(wixData.filter().contains('zipCodes', SearchValue))
  .then(() => {
 let count = $w("#dataset2").getTotalCount();
 if (count === 0) {
         wixLocation.to("/out-of-range");
      }
 else {
         wixLocation.to("https://mailchi.mp/surroundins.com/in-area");
      }}
  )}

this should work.
Maybe the site is not HTTPS

Hmmmm…weird. It’s exactly the URL they generated. I just copy and pasted.

Either way, doesn’t work. I’ve tried a variety of URLs just to see what would happen.

I think I found the answer. Have to test on published site. Can’t do it in preview.

Of course of course
Otherwise, it will delete the edit, since navigation is on the same tab and not a new tab.