469,626 Members | 1,760 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

Open a window

pd
guys,

i am trying to open a file in a pop-up window. but the file is not in
the same folder as the main file. so how do i reference a file in the
file system which a html file, but its just not in the same folder as
the source.

so i have, window.open('C:\temp\a.html'). but this is not working. and
index.html is in c:\

any help on how to get this to work. thanks.

Nov 13 '06 #1
3 1076
Lee
pd said:
>
guys,

i am trying to open a file in a pop-up window. but the file is not in
the same folder as the main file. so how do i reference a file in the
file system which a html file, but its just not in the same folder as
the source.

so i have, window.open('C:\temp\a.html'). but this is not working. and
index.html is in c:\

any help on how to get this to work. thanks.
Open the file directly in your browser and copy and paste the URL
from the location field into your code. It will use the "file:"
protocol, not "http:".
--

Nov 13 '06 #2
pd
tried that. used file:\\c:\\etc etc. but it still doesnt work. any
ideas.

Nov 13 '06 #3
Hi,

pd wrote:
tried that. used file:\\c:\\etc etc. but it still doesnt work. any
ideas.
The syntax would be file:///C:/<path of file>

Note the 3 forward slashes in front of the C:

HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Nov 13 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Les | last post: by
10 posts views Thread by Marshall Dudley | last post: by
10 posts views Thread by David McCulloch | last post: by
2 posts views Thread by Samir Pandey | last post: by
3 posts views Thread by NeverLift | last post: by
2 posts views Thread by Larry R Harrison Jr | last post: by
8 posts views Thread by Dominic Tocci | last post: by
7 posts views Thread by anthony.turcotte | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.