Embedding Javascript to a Page

Highlighted
New Member
5 0 0

I am trying to embed a lightbox form to a page. I now have the javascript at the end of theme.liquid. I use a class on the actual page to point to the script.

Source code of actual page:

<div class="jotformscript"><a class="btn lightbox-71493297037463">BOOK APPOINTMENT NOW</a></div>

 

Code in theme.liquid:

.jotformscript {
<script src="https://form.jotform.me/static/feedback2.js" type="text/javascript"> var JFL_71493297037463 = new JotformFeedback({ formId: '71493297037463', base: 'https://form.jotform.me/', windowTitle: 'Book Grooming Appointment', background: '#26baeb', fontColor: '#FFFFFF', type: '1', height: 500, width: 700, openOnLoad: false }); </script>
}

 

The form works this way but it's messing up with other functions on the website.

Please advise. Thank you so much!

0 Likes
Highlighted
Shopify Expert
9930 105 1766

Do you have a link to the page that has this code in place. I see issues in the code above, but seeing it live will help confirm the problem.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Highlighted
New Member
5 0 0

Thank you for your reply! 

Here's the page: https://www.pawpykisses.com/pages/pet-grooming

 

0 Likes
Highlighted
Shopify Expert
129 0 23

Hi,

You need to remove this one .jotformscript {} the right code is

<script src="https://form.jotform.me/static/feedback2.js" type="text/javascript"> var JFL_71493297037463 = new JotformFeedback({ formId: '71493297037463', base: 'https://form.jotform.me/', windowTitle: 'Book Grooming Appointment', background: '#26baeb', fontColor: '#FFFFFF', type: '1', height: 500, width: 700, openOnLoad: false }); </script>

 

Richard Nguyen | PageFly CEO
0 Likes