By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,521 Members | 1,252 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,521 IT Pros & Developers. It's quick & easy.

Open a window

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
pd
tried that. used file:\\c:\\etc etc. but it still doesnt work. any
ideas.

Nov 13 '06 #3

P: n/a
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.