Jump to content

Is it possible to do iframes in Squarespace?

Recommended Posts

I'm still in the trial stage of deciding whether or not to sign up with Squarespace. My stumbling block is that I am trying to place this iframe into a Code Block:


<iframe src="http://vvmls.rapmls.com/scripts/mgrqispi.dll?APPNAME=Victorvalley&PRGNAME=MLSLogin&ARGUMENT=uTE%2FGGOxdLDT8fqva6LIwA3Wz3HobarllU0CWrEf0rP9wjGsdHxaGaeC8DflAln0auPjOtFsuxLV6%2FTmCav%2F2g%3D%3D&KeyRid=1&MLS_Origin=VIC" width="100%" height="600" style="border:medium solid rgb(0,0,0)"></iframe>

It works fine if I put it into a standard HTML document and view it in a browser. But when I put it into a Code Block it loads the page with a sad face like it cannot connect. Any ideas on how to make iframes work in Sqarespace?

Link to comment
  • Replies 15
  • Views 48.6k
  • Created
  • Last Reply

iframes are not stable in code blocks; they need to be in an embed block. For an example of the HTML and CSS code, see the thread How do I get this iframe embed link to display?

Hope this helps.

I'm a retired attorney who was asked by a friend to build a website. In a prior lifetime, in a galaxy far, far away and long, long ago, I was a computer systems analyst / programmer. I'm a novice autodidact in CSS, JavaScript and HTML learning in part by example.. I've asked questions on this forum and been lucky enough to have others help me, so I'm inclined to answer any question I can. Pay it forward.

Link to comment

Hello Steve,

Thank you for the direction. So now I am getting a "Unable to resolve URL." message. This is what I have done so far:

In the CSS I have the following:


#my-iframe iframe {
 height: 600px;
 width: 100%;
 margin: 0;
 padding: 0;
 border-style: solid;
 border-width: 1px;
/*  to ensure proper scrolling and overflow handling on 
mobile devices, put this styling in a div wrapper around the 
iframe because it's unreliable in css:
 -webkit-overflow-scrolling: touch;
                 overflow: auto;
*/
}

In the EMBED BLOCK I have the following:
<div id="my-iframe"
style="text-align: center; -webkit-overflow-scrolling: touch;
 overflow: auto;"><iframe src="http://vvmls.rapmls.com/scripts/mgrqispi.dll?APPNAME=Victorvalley&PRGNAME=MLSLogin&ARGUMENT=uTE%2FGGOxdLDT8fqva6LIwA3Wz3HobarllU0CWrEf0rP9wjGsdHxaGaeC8DflAln0auPjOtFsuxLV6%2FTmCav%2F2g%3D%3D&KeyRid=1&MLS_Origin=VIC"></iframe>
</div>

Any ideas on how to solve the "Unable to resolve URL." message?

Link to comment

It sounds like you have put code in the place reserved for URLs only. When you edit the embed block, in the lower right corner of the text area, there is a faint

</>

symbol. Click that and you will get the text area where you embed code. Put the code there.

For the code use what's given in the thread How do I get this iframe embed link to display?If it's unclear to you after looking at that thread, let me know and I will help you with the exact code you need in your instance.

I'm a retired attorney who was asked by a friend to build a website. In a prior lifetime, in a galaxy far, far away and long, long ago, I was a computer systems analyst / programmer. I'm a novice autodidact in CSS, JavaScript and HTML learning in part by example.. I've asked questions on this forum and been lucky enough to have others help me, so I'm inclined to answer any question I can. Pay it forward.

Link to comment

Hello Steve,

I have put my code in the correct place </> and now get the sad face the article you sent me talks about. I have added the CSS and the Embed code but it doesn't appear to have solved the problem. What would you suggest I try next?

Link to comment

OK. In the embed block, in the code area not the url area, enter


<_div_ id="My-Iframe" Style="text-align: center;">[code]<_div_  style="-webkit-overflow-scrolling: touch; overflow: auto;
border: 3px inset #7a8b8b;">
<_iframe_ src="urlToMyIframe">Your browser does not
support iframes.<_/iframe_>
 <_/div_>
<_/div_></code></pre> Where **urlToMyIframe** is 

http://vvmls.rapmls.com/scripts/mgrqispi.dll?APPNAME=Victorvalley&PRGNAME=MLSLogin&ARGUMENT=uTE%2FGGOxdLDT8fqva6LIwA3Wz3HobarllU0CWrEf0rP9wjGsdHxaGaeC8DflAln0auPjOtFsuxLV6%2FTmCav%2F2g%3D%3D&KeyRid=1&MLS_Origin=VIC

Now I've copied that url directly from the top of this question where you first gave it. Be certain it is the correct url. Note: I've put hard returns in to make this appear better on the page. You leave it as one long string, no spaces, no hard returns.

In custom CSS enter


[code]#My-Iframe iframe {
 height: 600px;
 width: 100%;
 margin: 0;
 padding: 0;
 border-style: solid;
 border-width: 1px;
}</code></pre>

This should work for you.

Let me know what happens.

Note: You may not have noticed but in the code above some text appears in italics. Don't try to put italics in your code. Just type it plain text.

I'm a retired attorney who was asked by a friend to build a website. In a prior lifetime, in a galaxy far, far away and long, long ago, I was a computer systems analyst / programmer. I'm a novice autodidact in CSS, JavaScript and HTML learning in part by example.. I've asked questions on this forum and been lucky enough to have others help me, so I'm inclined to answer any question I can. Pay it forward.

Link to comment

I'm assuming the 'blockquote' tag was a mistake but I tried it with and without it and I still get the sad face. What I have in the code area not the url area:

Link to comment

Your CSS code looks correct so let's leave that as it is.

Your embed block code looks correct except for the src= part. The url you have between the quotes (http://www.cnn.com) is not a proper iframe url.

What you want between the quotes is the url that begins with http://vvmls.rapmls.com/scripts/mgrqispi.dll?

You want that entire long url just exactly as you gave it in your question at the top when you had it as href="longURL". Forget the href= and use instead src="longURL".

Yes, the 'blockquote' tag was a mistake.

Let me know what happens.

I'm a retired attorney who was asked by a friend to build a website. In a prior lifetime, in a galaxy far, far away and long, long ago, I was a computer systems analyst / programmer. I'm a novice autodidact in CSS, JavaScript and HTML learning in part by example.. I've asked questions on this forum and been lucky enough to have others help me, so I'm inclined to answer any question I can. Pay it forward.

Link to comment

Is there a space or a hard-return between the dll? and the APPNAME=

There should not be.

This is the only thing I can see that might be messing you up. If there is not, then it is possible that you have an incorrect url to the iframe content. I suggest going back to the place where you got it and getting it again, just to be sure. Copy and paste wherever you can.

I'm a retired attorney who was asked by a friend to build a website. In a prior lifetime, in a galaxy far, far away and long, long ago, I was a computer systems analyst / programmer. I'm a novice autodidact in CSS, JavaScript and HTML learning in part by example.. I've asked questions on this forum and been lucky enough to have others help me, so I'm inclined to answer any question I can. Pay it forward.

Link to comment

Hello Steve,

There is no space or hard return. If I take the same code and save it to a html document and then open it in a browser it works just fine. Squarespace must not like iframes very much. I thank you for your help but I think I will need to find a better solution than Squarespace. Have a wonderful day.

Link to comment

Hi,I'm trying to achive almost the same thing, it's even a real estate listing. When I use a simple code block like this:

It won't display on my trial site when I'm logged on as admin. When I open the site directly from an InPrivate-Window and use the Visitor access. I wont display as well, but there is a security warning. I would guess this is only because of SSL being enabled by default.

When I open the site without SSL (...the s in https) it displays just fine. Nothing else needed. So if we can disable SSL on the custom domain (which I think is the case anyway)...Hope this helps.

PS: I have to admit that this is not realy a good way to handle these listings though. When I come up with something better I'll let you know. These Real Estate listings are just ugly in my opinion, but my customers are stuck with them, so...

Link to comment

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.