Popup form conflicting since I changed to https

  • damiancooper
    Asked on March 1, 2017 at 7:42 AM

    I have just changed to https from http with my site. The popup message is now stopping two other elements from working since I changed. 

    This shows the slider and the orange banner at the bottom.

    Popup form conflicting  since I changed to https Image 1 Screenshot 30

    This is the popup form working but not the slider or the banner message at the bottom.

    Popup form conflicting  since I changed to https Image 2 Screenshot 41

     

    This is the code for the form:

    <script src="https://form.jotformeu.com/static/feedback2.js?3.3.REV" type="text/javascript">   

        

        

     

        function setCookie(cname, cvalue) {

            document.cookie = cname+"="+cvalue+"; ";

          }

     

          function getCookie(cname) {

              var name = cname + "=";

              var ca = document.cookie.split(';');

              for(var i = 0; i < ca.length; i++) {

                  var c = ca[i];

                  while (c.charAt(0) == ' ') {

                      c = c.substring(1);

                  }

                  if (c.indexOf(name) == 0) {

                      return c.substring(name.length, c.length);

                  }

              }

              return "";

          }

     

          function checkCookie() {

              var user = getCookie("username");

              if (user == "visited") {

                  

                  

                  

              } else {

     

                /*Place the JotForm Lightbox embed code here*/

                    var JFL_61524760719358 = 

                    new JotformFeedback({ 

                    formId: '61524760719358',

                    base: 'https://form.jotformeu.com/',

                    windowTitle: 'Book Me a Free Survey',

                    background: '#FFA500',

                    fontColor: '#FFFFFF',

                    type: '1', height: 700,

                    width: 300,

                    openOnLoad: false

                    });

     

     

                      setCookie("username", "visited");

              }

          }

     

        checkCookie();

          

        </script>

     

          <!-- Edit the anchor link element by adding an id attribute 'lightbox' and setting its display to none -->

          <a id="lightboxdelay" class="btn lightbox-61524760719358" style="margin-top: 16px;display:none;">

            Book me a Free Survey

          </a>

     

          <!-- This is the script to make a 10 second delay, you can adjust the seconds here -->

          <script language="JavaScript">

              var delayseconds = 15;

                  function pause() {

                  myTimer = setTimeout('whatToDo()', delayseconds * 1000)

                  }

                 function whatToDo() {

                    document.getElementById('lightboxdelay').click();

                  }

              window.onload = pause;

          </script>

     

    They won't work together?

    Can you help?

     

    Thanks

    Damian

  • Welvin Support Team Lead
    Replied on March 1, 2017 at 11:39 AM

    Would you mind trying the default Lightbox script, without any modifications? See if that works. You seem to have modified the script and I think that's causing the problem in the page. Please try it and let us know if the issue persists.

  • damiancooper
    Replied on March 1, 2017 at 11:49 AM

    Sure, I'll have to try tomorrow, in the UK