Results 1 to 4 of 4

Thread: orphan files in javascript

  1. #1
    Join Date
    Mar 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default orphan files in javascript

    I really like jims menu 5.7 I have everything in the right place but for some reason the files are being read as orphaned. They are in the same file folder too what am I doing wrong.

    John

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Files on a site referenced only via javascript will appear to be orphans to any type of utility that checks for orphans without parsing the scripts involved on the site. Unfortunately, this is all utilities of this type that I have ever seen. If you are wanting to make the files not be orphans to a utility like this or a web spider that is cataloguing the site, create dummy links to them on the page, these links may be able to be display:none or visibility:hidden. They certainly could be say white text on a white background or simply contain no text or image portion:

    HTML Code:
    <a href="orphan.htm"></a>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am a bit confused about where I create the dummy files do I do it in the javascript? Its reading the javascript files as orphan files

    thanks,
    John

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by webdesignee
    I am a bit confused about where I create the dummy files do I do it in the javascript? Its reading the javascript files as orphan files

    thanks,
    John
    OK, what's 'it', as in "Its reading the javascript files as orphan files". This is probably just a variation on the problem I outlined in my previous response. If you have like:

    HTML Code:
    <script type="text/javascript" src="some.js">
    Many utilities that look for orphans will not see that as a link and report some.js as an orphan. I use one called "HTML Rename!" it has options to exclude files by name, directory or extension. Setting one of these filters to exclude your javascript (and often css) files is best. If your utility doesn't have this feature, a dummy link can be made but, could cause other problems. Something like:

    HTML Code:
    <a href="some.js"></a>
    This would go on the page that uses the some.js file.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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