PDA

View Full Version : orphan files in javascript



webdesignee
04-09-2006, 03:06 AM
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

jscheuer1
04-09-2006, 08:24 AM
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:


<a href="orphan.htm"></a>

webdesignee
04-09-2006, 02:52 PM
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

jscheuer1
04-09-2006, 04:39 PM
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:


<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:


<a href="some.js"></a>

This would go on the page that uses the some.js file.