JavaScript call file help needed

Discussion in 'JavaScript' started by melaniejk, May 31, 2007.

  1. #1
    Hi.
    Instead of copy and pasting the same links on many pages someone suggested that I call a javascript file. But, I can't get it to work. I'm not sure what I'm doing wrong. I copied the same way they did it.

    On this page:
    http://www.countycourthouse.us/AL/baldwincounty.html

    I put:
    <!-- AL Ancestry -->
    <script language="JavaScript" src="http://www.countycourthouse.us/AL/ancestry-al.js">
    </script>

    But, it doesn't show up at all.


    I'd really appreciate your help. Thank you.
     
    melaniejk, May 31, 2007 IP
  2. wing

    wing Active Member

    Messages:
    210
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    58
    #2
    There seems to be errors in your document.write('').

    You need to have everything within document.write('here is some text and html and stuff'); on one line.

    Not have linbreaks in between: document.write('Here is
    some text and
    html and stuff');

    :)
     
    wing, May 31, 2007 IP
  3. melaniejk

    melaniejk Peon

    Messages:
    397
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ok, I took out the spaces. But, it still doesn't work. :(
     
    melaniejk, May 31, 2007 IP
  4. wing

    wing Active Member

    Messages:
    210
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    58
    #4
    There is still a linebreak on the first line
    document.write('<ul>');document.write('<li><a
    href="http://www.dpbolvw.net/click-2428430-10464016?url=http%3A%2F%2Fwww.ancestry.com%2Frd%2Fcjus.aspx%3Fkey%3DD2080&cjsku=D2080" target="_top">D-Alabama Marriages to 1825</a><img src="http://www.lduhtrp.net/image-2428430-10464016" width="1" height="1" border="0"/></li>');
    PHP:
    :)
     
    wing, May 31, 2007 IP
  5. melaniejk

    melaniejk Peon

    Messages:
    397
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thank you for your help, Wing.
    It's working now.
     
    melaniejk, Jun 1, 2007 IP