Sorry, but I don't really follow your question. If you want to change a file on your hard drive from a web page javascript will not work. You can try using IE specifically to work with active x which might grant permissions to write to files.
If you want to show different information if your looking at the file offline you could try using javascript to check for internet access. There are probably a few ways, I think IE has the function onLine() or something. You could always use an ajax request to check for a connection and then show different information depending on the callback.
I'm not quite sure what your goal is...