Major Help Needed!

  • 1
  • Question
  • Updated 8 years ago
  • Answered
What is the code to make iframed websites of my website display my URL in the address bar?
Photo of James

James

  • 75 Posts
  • 2 Reply Likes

Posted 8 years ago

  • 1
Photo of jeremy

jeremy, Employee

  • 1349 Posts
  • 90 Reply Likes
Hi there James,

I am not exactly sure what you are wanting to do...

Are you wanting to place your website in an iframe on another site or assign your domain to another site?

To add an iFrame to your page, drag and drop an HTML Widget and then paste the following code:

<iframe src ="http://www.google.com&quot; width="100%" height="300">
<p>Your browser does not support iframes.</p>
</iframe>

Replace "http://www.google.com&quot; with the URL you want to use.

I hope this helps. If you need any further assistance, please let us know.
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
I think what he means is that he wants it to work like the Yola website. He wants his website to break out of frames and automatically go to his address rather than it staying trapped in the frame.
Photo of James

James

  • 75 Posts
  • 2 Reply Likes
nathan is right, that is how i would like it to work
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
Hi, do you want it to break out of the iframe and forward to your website so people can't frame your site? I mean, lets say someone makes an iframe of your website and basically they just made a copy of your website. But, do you want it to go to http://contactjames.tk instead of it staying in that frame? Here is the code on to do that:

<script language="JavaScript" type="text/javascript">
<!--
function breakout_of_frame()
{
// see http://www.thesitewizard.com/archive/...
// for an explanation of this script and how to use it on your
// own website
if (top.location != location) {
top.location.href = document.location.href ;
}
}
//-->
</script>

To make this work, just drag and drop an HTML widget on the page and paste this code in. Can you let me know if this works? Thanks!

Nathan
Photo of James

James

  • 75 Posts
  • 2 Reply Likes
Thanks nathan! although i made a test for my one website and it doesnt seem to be working, is that because there is a 2 iframes?
Such as iframe1 displaying an iframe of my website
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
I don't know why it isn't working, I know the www.yola.com does that. Here, James, go into Dot TK real quick and forward jclan.tk to Yola. Then, when you go to jcllan.tk it will automatically forward to yola.com instead of staying trapped in the frame. I wonder how thats done.
Photo of James

James

  • 75 Posts
  • 2 Reply Likes
hmm ill just add jclan.tk as a secondary domain, i know it will work that way
Photo of James

James

  • 75 Posts
  • 2 Reply Likes
such as if i go to: go2kid2.tk it will automatically got to go2kid.tk, yola will do that for you
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
But did you try forwarding it to www.yola.com really quick? To see how it breaks out of the frame. Or did you say you already know that it does that?
Photo of James

James

  • 75 Posts
  • 2 Reply Likes
yes i tried it and i see that all the time thats why i wanted to do that lol, im just going to forward jclan.tk as a secondary domain, because i use jclan.tk for a shorter domain name so people can get to my site, i only used iframes so it would be easier, and it wasnt working to well lol
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
James, how did you get that go2kid2.tk to break out of the frame? That is so awesome!!!! But how did you do it?
Photo of James

James

  • 75 Posts
  • 2 Reply Likes
there isn't a frame, on yola i put up 2 different sites, one for www.go2kid.tk and the other for www.go2kid2.tk
Then i went into the settings for www.go2kid.tk from yola and transfered the domain from go2kid2 over to www.go2kid.tk
Yola did all the work lol, i just forwarded them both with yola and they did the rest lol
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
But what if someone create a Dot TK domain and forwards it to contactjames.tk without your permission? When you forward a domain with Dot TK, that is a frame. Not an iframe, a frame. Anyone can really go into Dot TK and forward a .tk domain to my website too. But if they do that to the Yola website it breaks out of the frame and goes to Yola.com instead of staying in that .tk domain. I wonder how they do that. I emailed and asked Yola once but I guess it was against their Terms of use to email support about stuff like that or something. Anyways, someday I am going to find a code to do that! (at least I hope I do!)
Photo of James

James

  • 75 Posts
  • 2 Reply Likes
got my site up, thank you yola team!
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
Is this question you posted about getting your site up? I thought it was about iframes.
Photo of James

James

  • 75 Posts
  • 2 Reply Likes
well, both because my site was a iframe of my other site
i use jclan.tk for shorter domain instead of codclan.contactjames.tk
Its all fixed though thanks for the help!
Photo of Nathan

Nathan, Champion

  • 3739 Posts
  • 307 Reply Likes
No problem James!