Jump to content

On-Click Pop-Ups on Summary Block

Recommended Posts

Posted

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!

  • Replies 4
  • Views 723
  • Created
  • Last Reply
Posted
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 (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

Archived

This topic is now archived and is closed to further replies.

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