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 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2007
    Posts
    135
    Thanks
    1
    Thanked 2 Times in 2 Posts

    Loading javascript from external file.

    Hi,

    I would like to know if the following code can be loaded from an extrernal file. So that I don't have too many code on my webpage.

    Code:
    <link rel="meta" href="http://deletespyware-adware.com/labels.rdf" type="application/rdf+xml" title="ICRA labels" />
    
    <meta http-equiv="pics-Label" content='(pics-1.1 "http://www.icra.org/pics/vocabularyv03/" l gen true for "http://deletespyware-adware.com" r (n 0 s 0 v 0 l 0 oa 0 ob 0 oc 0 od 0 oe 0 of 0 og 0 oh 0 c 0)  gen true for "http://www.deletespyware-adware.com" r (n 0 s 0 v 0 l 0 oa 0 ob 0 oc 0 od 0 oe 0 of 0 og 0 oh 0 c 0))' />
    If so can anyone please explain how to do it.

    Thanks a lot!
    Lashley

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    <script type="text/javascript" src="yourfile.js"></script>

    In that add document.write() statements

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Regular Coder
    Join Date
    Jan 2007
    Posts
    135
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Hi,

    Ok, the script worked for other sort of javascripts but not for the one I mentioned. When I click on the image on my site to load the ICRA page, the ICRA is suppose to read the code above. When I place it in an external file it does not read the code.

    In other words I have to leave it as it is to work.

    Thanks,
    Karl


  •  

    Posting Permissions

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