CMS Development

ChrisDavis
メンバー | Elite Partner
メンバー | Elite Partner

Modal with iFrame Gives HTTP Error 400 (Bad Request)

解決

We are trying to help a client resolve a function of their existing site that HubSpot did not transfer over when migrating their site to HubSpot.

 

Their old site had a modal that opened and showed iFrame content within the opened modal. But HubSpot just set the links to open in a new tab. I was able to use Magnific Popup to handle the modal part and used a custom module to have a text field for entering the button text and a text field for dropping the iFrame URL in. The code snippet for the iFrame URL is where the src would go in the iFrame code.

 

I have tried just placing the iFrame URL instead of the code snippet, which kind of worked. The iFrame audio plays when you visit the page, but it should not. Then when you click the button, the iFrame is shown in the modal correctly.

 

So my problem, is what is causing the code snippet to mess up when it is in place?

 

Preview Link with the LAUNCH OUR VIDEO VIEWBOOK button at the bottom of the page.

0 いいね!
1件の承認済みベストアンサー
ChrisDavis
解決策
メンバー | Elite Partner
メンバー | Elite Partner

Modal with iFrame Gives HTTP Error 400 (Bad Request)

解決

Just to give an update on this issue. I was able to narrow down the cause of the glitch to be that the text field added in the custom module is not handling the URL structure correctly and altering the URL structure enough that it can not reach the iFrame link.

元の投稿で解決策を見る

0 いいね!
2件の返信
ChrisDavis
解決策
メンバー | Elite Partner
メンバー | Elite Partner

Modal with iFrame Gives HTTP Error 400 (Bad Request)

解決

Just to give an update on this issue. I was able to narrow down the cause of the glitch to be that the text field added in the custom module is not handling the URL structure correctly and altering the URL structure enough that it can not reach the iFrame link.

0 いいね!
jessebeginbound
参加者 | Platinum Partner
参加者 | Platinum Partner

Modal with iFrame Gives HTTP Error 400 (Bad Request)

解決

Hi @ChrisDavis!

 

I know I'm a little late to reply here but just in case this helps anyone in the future, we have a custom module that allows you to trigger an iframe from a custom button very easily with no coding required. You can style the button and place it anywhere on any HubSpot CMS Template or page - no coding required. 

It's also worth mentioning that the module allows you to put a HubSpot Form, PDF, YouTube video, image or iframe into it! Whatever one you need! Check it out here if you're interested: http://beginbound.hs-sites.com/ultimate-popup-wizard-begin-bound-hubspot-custom-module