main
side
curve
  1. In Memory of LAJ_FETT: Please share your remembrances and condolences HERE

getting rid of frames/reloading

Discussion in 'Archive: Fan Sites' started by djr33, Apr 3, 2004.

Thread Status:
Not open for further replies.
  1. djr33

    djr33 Jedi Master star 4

    Registered:
    Apr 5, 2003
    i have a site at 1and1.com. i like to use the free domain names at "dot.tk" just so i dont have to tell people the long addresses....

    basically, the way that .tk works...
    -go to their site and sign up for whateveruwant.tk
    -fill out the info, etc, etc and within a day or so, that domain will just redirect to your current site

    the problem:
    the way it redirects is to put the currect site in a frame. the main problems with this are that if you refresh the whole thing it goes back to whatever the original page (in other words, site.tk redirects to 1and1.com/site then you click a link and your now at google.com, u hit refresh, and then you go back to site.tk in other words, 1and1.com/site... just an example, but this can be frustrating)
    and... the address in the address bar always stays the same (from the example above, no matter how many links you have clicked, it will still say "http://www.site.tk" and not the address you are at now)

    this is kinda hard to follow, i know, but i can explain more if anyone needs it.

    basically, i am asking for a way to get rid of the frame and then have "site.tk" (example) simply redirect to "1and1.com/site" (ex.) without the address saying "site.tk"...

    here is the code that i found:
    <script language=javascript type="text/javascript"><!--
    if (top.location != self)
    {
    top.location = "#";
    }
    // --></script>

    this is exactly what i want... one problem: it will always make the address display as "[address]#" so if it was "1and1.com/site", then it would refresh to "1and1.com/site#" [face_plain]

    any ideas?
     
  2. MaxVeers

    MaxVeers TFN FanFilms Staff, Manager Emeritus star 5 VIP - Former Mod/RSA

    Registered:
    Apr 24, 2000
    The free service provides URL forwarding, which as you said, is just a frame pointing to your real hosting.

    To actually have the domain point to your hosting is more complicated, and you won't find anyone doing it for free. It involves pointing the DNS servers of the domain name to your hosting. In order to do this, you need DNS control of your domain and .TK doesn't give you that. Godaddy and other pay sites do.
     
  3. djr33

    djr33 Jedi Master star 4

    Registered:
    Apr 5, 2003
    no... i know this, but if you look at the javascript code above, it does what i am asking, but it just leaves a "#" after the address and that is annoying.
    thanks for trying to help anyway :)
     
  4. MaxVeers

    MaxVeers TFN FanFilms Staff, Manager Emeritus star 5 VIP - Former Mod/RSA

    Registered:
    Apr 24, 2000
    How about adding your own javascript that changes top.location to ""?
     
  5. djr33

    djr33 Jedi Master star 4

    Registered:
    Apr 5, 2003
    i think i tried that... one sec, i will again tho. i think that just invalidates the whole thing because there is nothing that the reload/link points to... one sec.

    edit: nope. that just keeps reloading the site, never stopping...

    edit2: thanks for the ideas tho :)
     
  6. Raef_Wolfe

    Raef_Wolfe Jedi Padawan star 4

    Registered:
    Jul 12, 2003
    DJ:

    I have the same problem with cjb.net

    www.wereincreations.furtopia.org becomes www.raef.cjb.net, but when I refresh it spoots :/
     
  7. djr33

    djr33 Jedi Master star 4

    Registered:
    Apr 5, 2003
    ok. i got it solved. i have javascript that refreshes it and its fine (this time with no "#")

    here you go :)
    <script language="JavaScript" type="text/javascript">
    <!--

    if (top != self) {
    top.location = self.location
    }
    //-->
    </script>


    also, i figured out another (more effort) way just in case anyone is curious. this one uses just the code from the first post...
    basically, set up a blank page, upload it. have the .tk (or .cbj, whatever) point to that blank page... all that site needs on it is the code below. replace "ADDRESS" (where the "#" was) with whatever address is your real site.

    <script language=javascript type="text/javascript"><!--
    if (top.location != self)
    {
    top.location = "ADDRESS";
    }
    // --></script>


    thanks for your help, guys :)

    to see this code in action, visit creativeimagination.tk (that isnt too obviously just a plug for my site, right? :p)
     
  8. Raef_Wolfe

    Raef_Wolfe Jedi Padawan star 4

    Registered:
    Jul 12, 2003
    One problem.

    I can't press the back button.
     
  9. djr33

    djr33 Jedi Master star 4

    Registered:
    Apr 5, 2003
    what? ooo.. that is a little weird. this is the best way tho and worth it. just click the arrow next to back and choose the 2nd item and it will go back. or, try to click as fast as you can twice... maybe it will go faster than the reload... think of it as a game ;) :D
     
Thread Status:
Not open for further replies.