Този сайт ще има ограничена функционалност, докато се извършва тече неговата поддръжка. Ако дадена статия не може реши проблема ви и искате да зададете въпрос, нашата общност е готова да ви помогне на @firefox в Twitter и /r/firefox в Reddit.

Търсене в помощните статии

Избягвайте измамите при поддръжката. Никога няма да ви помолим да се обадите или изпратите SMS на телефонен номер или да споделите лична информация. Моля, докладвайте подозрителна активност на "Докладване за злоупотреба".

Научете повече

What is the path structure, when I OPEN a local html file on my C drive?

  • 3 отговора
  • 9 имат този проблем
  • 2 изгледи
  • Последен отговор от cor-el

more options

I downloaded WikiLeak's afgan diary html, which has links with the following format: "file:///afgan/type/air raid_0.htm". However I put the files in a folder "My Documents\WikiLeaks\HTMLfiles". So now the link does not work. What is wrong?

This happened

Every time Firefox opened

I downloaded WikiLeak's afgan diary html, which has links with the following format: "file:///afgan/type/air raid_0.htm". However I put the files in a folder "My Documents\WikiLeaks\HTMLfiles". So now the link does not work. What is wrong? == This happened == Every time Firefox opened

Избрано решение

No, that is a path to a server and likely malformed because in that case you need 5 slashes. To locate a file on the C drive you need to use file:///C:/Documents and Settings/<user>/My Documents/WikiLeaks/HTMLfiles

If links are hard coded like you wrote them then it may be a lot of work to get it working.

You can use a bookmarklet like this to fix links in Firefox and save the page if the links are working: javascript:(function() }alert(j);})(); You need to change the S and R variables to the proper file path. In the regular expression you need to escape a "/" as "\/" and a dot (.) as [.]

See also https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global_Objects/RegExp

Прочетете този отговор в контекста 👍 0

Всички отговори (3)

more options

Easiest to do that is to open the file via File > Open File and copy the URL from the location bar. You can also drag the file in a Firefox window (tab).

more options

As I explained previously: I downloaded WikiLeak's afgan diary html, which has links with the following format: "file:///afgan/type/air raid_0.htm". However I put the files in a folder "My Documents\WikiLeaks\HTMLfiles". So now the link does not work. Here is an example of what I mean:

Browse by Type air mission (431) counter insurgency (4) counter-insurgency (39) criminal event (480) detainee operations (1208) enemy (13) enemy action (27078) explosive hazard (23082) friendly action (13734) friendly fire (148) non-combat event (7719) other (2752) suspicious incident (208) unknown initiated action (12)

I clicked on "counter insurgency (4)" and that link did NOT work. Looking at that URL, this is the contents: "file:///afg/sort/type/counter_insurgency_0.html" Is that the correct format to get to that local file on my C drive?

more options

Избрано решение

No, that is a path to a server and likely malformed because in that case you need 5 slashes. To locate a file on the C drive you need to use file:///C:/Documents and Settings/<user>/My Documents/WikiLeaks/HTMLfiles

If links are hard coded like you wrote them then it may be a lot of work to get it working.

You can use a bookmarklet like this to fix links in Firefox and save the page if the links are working: javascript:(function() }alert(j);})(); You need to change the S and R variables to the proper file path. In the regular expression you need to escape a "/" as "\/" and a dot (.) as [.]

See also https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global_Objects/RegExp