Jump to content

On-Click Pop-Ups on Summary Block

Recommended Posts

Site URL: https://www.grandtrees.org/partners

Hey there friends, 

We're hoping to add an on-click pop-up to our partners page so that further investigation doesn't pull viewers away from our partners page. I've done some research and was ready to test the code but then realized that there isn't an obvious code option within summary blocks.

So, this is a 2-part question. 

1) Is it possible to add custom code to a summary block?

2) Does this code make sense?

<!DOCTYPE html>
<title>Sponsor Name</title>

<input id="go" type="image" value="Sponsor Name" onclick="window.open('https://www.grandtrees.org/grandtrees-partner-posts/fruit-trees-planted-in-thorncliffe-park-gkdrz-rc2jy-lck2m','popUpWindow','height=500, width=400, left=100, top=100, resizable=yes, scrollbars=yes, toolbar=yes, menubar=no, location=no, directories=no, status=yes');">

I'm using https://www.quackit.com/ to play around with the code and it looks ok when I test on the site, although I don't know how to make it so that the pop-up occurs when you click a specific image - as each image will have it's own pop-up redirect. 

Thanks for your help!

Link to comment
On 3/20/2021 at 1:49 AM, HOHTFL said:

Site URL: https://www.grandtrees.org/partners

Hey there friends, 

We're hoping to add an on-click pop-up to our partners page so that further investigation doesn't pull viewers away from our partners page. I've done some research and was ready to test the code but then realized that there isn't an obvious code option within summary blocks.

So, this is a 2-part question. 

1) Is it possible to add custom code to a summary block?

2) Does this code make sense?

<!DOCTYPE html>
<title>Sponsor Name</title>

<input id="go" type="image" value="Sponsor Name" onclick="window.open('https://www.grandtrees.org/grandtrees-partner-posts/fruit-trees-planted-in-thorncliffe-park-gkdrz-rc2jy-lck2m','popUpWindow','height=500, width=400, left=100, top=100, resizable=yes, scrollbars=yes, toolbar=yes, menubar=no, location=no, directories=no, status=yes');">

I'm using https://www.quackit.com/ to play around with the code and it looks ok when I test on the site, although I don't know how to make it so that the pop-up occurs when you click a specific image - as each image will have it's own pop-up redirect. 

Thanks for your help!

You can place the url into Source URL settings of blog posts, it will link to the page when use summary block

Linking a blog post title to another page – Squarespace Help

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
On 3/24/2021 at 2:29 AM, HOHTFL said:

It would be the code I would want to add though not the URL.

I think you can use some plugin to add popup, like Lightbox plugin.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • 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.