Embedding Javascript to a Page

Valerie4
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
Jason
Shopify Expert
10254 142 1940

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.

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
0 Likes
Valerie4
New Member
5 0 0

Thank you for your reply! 

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

 

0 Likes
Richard_
Shopify Expert
129 0 27

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