Jump to content

MBurleson

Circle Member
  • Posts

    18
  • Joined

  • Last visited

Posts posted by MBurleson

  1. On 6/14/2023 at 7:04 PM, creedon said:

    Ah client demands. Understood.

    OK. I don't have an immediate solution but an observation. The reason the code works when the page first loads and the link is clicked is that LBA is loading that page up into the current page and your code to open the link runs. That happens once. The second click on the link does not load the LBA page but just shows it so the code to open the window does not run.

    A solution might be to not trigger off the page first load but some other event you can monitor. For example you might try tying into the click on the pay online link itself. Or, you could observe the show/hide state of the LBA itself. Again, I don't have any specific code, these are just ideas.

    How would you go about tying the event to the link click instead? Some Javascript in the footer injection that listens for that link to be clicked and then executes?

    I have tried this code: 

     

    <script>
    function openLink(url) {
      window.open(url);
    }
      document.getElementByTagName("a[href='#1-pay-online']").addEventListener("click", function() {
        openLink("#lightbox_pay-online");
      });
      
    </script>

     

    While leaving the redirect JS on the pop-up page - doesn't seem to be working...maybe I have the code wrong or in the wrong spots...idk...getting past my coding knowledge now.

     

     

  2.  

    The page is talala.squarespace.com and the password is OMAG.

    The specific link is the one in the Nav header that says pay online.

    You can see when you click on the link, it opens a lightbox anything pop-up that then runs a javascript cod eon the page to open a new window to a specific URL. 

  3. So I have Lightbox anything loading a page on my site, on the page I have some content and then this code: 

    <script type="text/javascript">    
      setTimeout(openUrl, 1500);
      function openUrl() {window.open('https://secure.cpteller.com/terminal/portal/?op=9LkVp0Ko0lLQ', '_blank');}
    </script>

    So the pop-up loads and then opens a blank page with the URL redirect. My issue is, once the link has been clicked and poped-up and then closed, if it is clicked again, the java script won't initialize again. I am not sure how to make it refresh and run the code every time the link in the website's nav is clicked. 

    Thoughts?

  4. On 5/30/2023 at 1:00 PM, sayreambrosio said:

    Glad to see you got it sorted. Just in case you run into it again, the first thing I always suggest trying is clearing the cache of the browser you are using. If that doesn't work, trying a different browser usually solves it.

    Yeah, I had tried that, I think Squarespace was having a bug that day. 

  5. Definitely not what I was asking. All Squarespace sites, when you start a new one, are assigned a generic "built-in-domain". You can change that domain title to something that isn't generic to make it easier to share out with a password so clients can see the site before a service plan has been paid for. 

    Example: The site I created earlier, had the built-in-domain buffalo-plums-xrnzs.squarespace.com, I am guessing it was some sort of bug because I have since been able to change it to thehseu.squarespace.com and set it to a private page with a password for the client to be able to see it. 

    I wasn't trying to connect a custom domain from a third-party provider...

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.