Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to "hotlink" txt files in a table from another domain

    Dear Sirs/Madams

    I am a dumb **** when it comes to coding, i know how to hotlink a image, but how do you do it when you wanna have some txt links from a different domain.

    i`m thinking of having some of my sites in a txt link for every pages i have on the internet like in a 1 row table and when i add a new site it will come up on hundreds of pages


    like this

    site1.com - Site2.com - site3.com


    help me, i will give food for coding

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    The Planet Earth Code Poet: True
    Posts
    282
    Thanks
    0
    Thanked 1 Time in 1 Post
    If I understand your question , you could use an external javascript to do this. You external script would look something like this:

    document.write('<a href="http://site1.com">site 1</a>');
    document.write('<a href="http://site2.com">site 2</a>');
    document.write('<a href="http://site3.com">site 3</a>');

    You could just follow the pattern adding more links as needed. You would save the file and store it somewhere. Lets say you called it myLinks.js and stored it in the root of site1. Then on any page you would like to print out the links you would simply put:

    <script type="text/javascript" src="http://site1.com/myLinks.js"></script>

    Now anytime a page is loaded with these script tags the links in the myLinks.js file will be written out to the page. You would only ever have to change the myLinks.js file to change what is written on each of the pages containg these script tags.

  • #3
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanx a million John that worked fine, i own you some food

    but how do you do it and still get the txt links spidered by the SE
    or will the SE robots track the links the way it is now

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    The Planet Earth Code Poet: True
    Posts
    282
    Thanks
    0
    Thanked 1 Time in 1 Post
    I could be wrong but I beleive it will still work. It is my understanding that the bot will see the link to the js file then go there and read its links.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •